From patchwork Wed Jun 4 11:32:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pascal Huerst X-Patchwork-Id: 355840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 36CFA14009E for ; Wed, 4 Jun 2014 21:34:28 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 812BE89683; Wed, 4 Jun 2014 11:34:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XyYz-0KTcLGU; Wed, 4 Jun 2014 11:34:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 23A0A8AFC0; Wed, 4 Jun 2014 11:34:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DB45F1C2A51 for ; Wed, 4 Jun 2014 11:34:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D60FD27051 for ; Wed, 4 Jun 2014 11:34:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id baQsHs0JKDba for ; Wed, 4 Jun 2014 11:34:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by silver.osuosl.org (Postfix) with ESMTPS id 975C425DFE for ; Wed, 4 Jun 2014 11:34:16 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id x48so8372029wes.36 for ; Wed, 04 Jun 2014 04:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qRWng/NUeKniNSgBT8B2xx4qY3ZIuPI8tZtzhL+Z4zk=; b=Al05CeTul9yDiXk5C/7DU/QbglUNj53yMiaOQfCNY3vtPZHL2/ucTTDvU1eATa84JN eTUJD19MW4bmQDKbLa0G0sWlJZIaaFW1QMMIozFDaFyan4aoqEritmCaSq0M834CI0Qd Oe4HjytS/yTpKfSgJXLadD+TWoEXKzwXQzSJDKHLz+BwGWVsEVZ2OoYifT1MgXXlXJN9 Yuvl0gbaTRBaCGMe/89Wk4vVaDQV4N//u7Xi+ggti2XjfbRmyuWtKnbL+nL11gp50wRJ gj6/vhxTgG36jUA++Lz4c0ju/YwF3HP/Z87dykeEX0VyUwOwpXB7N+5xLzOnH+vnS0z7 HT6g== X-Received: by 10.15.36.136 with SMTP id i8mr541283eev.74.1401881654987; Wed, 04 Jun 2014 04:34:14 -0700 (PDT) Received: from mbpro.LOCAL (p5099deeb.dip0.t-ipconnect.de. [80.153.222.235]) by mx.google.com with ESMTPSA id f3sm5158933eep.40.2014.06.04.04.34.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jun 2014 04:34:14 -0700 (PDT) From: Pascal Huerst To: buildroot@buildroot.org Date: Wed, 4 Jun 2014 13:32:52 +0200 Message-Id: <1401881573-12921-2-git-send-email-pascal.huerst@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1401881573-12921-1-git-send-email-pascal.huerst@gmail.com> References: <1401881573-12921-1-git-send-email-pascal.huerst@gmail.com> Subject: [Buildroot] [PATCH V4 1/2] google-breakpad: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Breakpad is a library and tool suite that allows you to distribute an application to users with compiler-provided debugging information removed, record crashes in compact "minidump" files, send them back to your server, and produce C and C++ stack traces from these minidumps. Breakpad can also write minidumps on request for programs that have not crashed. Signed-off-by: Pascal Huerst --- package/Config.in | 1 + package/google-breakpad/Config.in | 21 ++++++++++++ .../google-breakpad/google-breakpad-gen-syms.sh | 37 ++++++++++++++++++++++ package/google-breakpad/google-breakpad.mk | 17 ++++++++++ 4 files changed, 76 insertions(+) create mode 100644 package/google-breakpad/Config.in create mode 100755 package/google-breakpad/google-breakpad-gen-syms.sh create mode 100644 package/google-breakpad/google-breakpad.mk diff --git a/package/Config.in b/package/Config.in index 1706197..ea94f01 100644 --- a/package/Config.in +++ b/package/Config.in @@ -54,6 +54,7 @@ source "package/dstat/Config.in" source "package/duma/Config.in" source "package/fio/Config.in" source "package/gdb/Config.in" +source "package/google-breakpad/Config.in" source "package/iozone/Config.in" source "package/kexec/Config.in" source "package/ktap/Config.in" diff --git a/package/google-breakpad/Config.in b/package/google-breakpad/Config.in new file mode 100644 index 0000000..5c9e18b --- /dev/null +++ b/package/google-breakpad/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_GOOGLE_BREAKPAD + bool "google-breakpad" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_aarch64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + + help + Google-Breakpad is a library and tool suite that allows you to distribute + an application to users with compiler-provided debugging information + removed, record crashes in compact "minidump" files, send them back to + your server, and produce C and C++ stack traces from these minidumps. + Breakpad can also write minidumps on request for programs that have not + crashed. + + Add all binaries and libraries you want to debug by google-breakpad to + BR2_GOOGLE_BREAKPAD_INCLUDE_FILES + + http://code.google.com/p/google-breakpad/ + +comment "google-breakpad requires an (e)glibc toolchain w/ C++ enabled" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/google-breakpad/google-breakpad-gen-syms.sh b/package/google-breakpad/google-breakpad-gen-syms.sh new file mode 100755 index 0000000..e082875 --- /dev/null +++ b/package/google-breakpad/google-breakpad-gen-syms.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +STAGING_DIR=$1 +HOST_DIR=$2 +INCLUDE_FILES=$3 + +# Search for files we want to dump symbols of +FIND_CMD="find $STAGING_DIR -name \"\"" + +for INCLUDE_FILE in $INCLUDE_FILES; do + FIND_CMD="$FIND_CMD -o -name \"$INCLUDE_FILE\"" +done + +# Create directory structure +SYMBOLS_DIR=$STAGING_DIR/usr/share/google-breakpad-symbols + +mkdir -p $SYMBOLS_DIR/tmp + +for BIN_PATH in $(eval $FIND_CMD); do + BIN=$(basename $BIN_PATH); + SYM=$BIN.sym; + + $HOST_DIR/usr/bin/dump_syms $BIN_PATH > $SYMBOLS_DIR/tmp/$SYM 2>/dev/null; + + if [ $? -eq 0 ]; then + HASH=$(head -n1 $SYMBOLS_DIR/tmp/$SYM | cut -d ' ' -f 4); + mkdir -p $SYMBOLS_DIR/$BIN/$HASH + mv $SYMBOLS_DIR/tmp/$SYM $SYMBOLS_DIR/$BIN/$HASH; + else + rm -f $SYMBOLS_DIR/tmp/$SYM + echo "Can not dump symbols of $BIN for google-breakpad!" + fi +done + +rm -Rf $SYMBOLS_DIR/tmp + +exit 0 diff --git a/package/google-breakpad/google-breakpad.mk b/package/google-breakpad/google-breakpad.mk new file mode 100644 index 0000000..e5b69c0 --- /dev/null +++ b/package/google-breakpad/google-breakpad.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# google-breakpad +# +################################################################################ + +GOOGLE_BREAKPAD_VERSION = 1320 +GOOGLE_BREAKPAD_SITE = http://google-breakpad.googlecode.com/svn/trunk +GOOGLE_BREAKPAD_SITE_METHOD = svn +GOOGLE_BREAKPAD_CONF_OPT = --disable-processor --disable-tools +GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad +GOOGLE_BREAKPAD_INSTALL_STAGING = YES +GOOGLE_BREAKPAD_LICENSE = BSD-3c +GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE + +$(eval $(host-autotools-package)) +$(eval $(autotools-package))