All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] store debug information in $HOST_DIR/lib/debug
Date: Mon, 4 Feb 2019 17:58:09 +0100	[thread overview]
Message-ID: <20190204175809.7b710934@windsurf> (raw)
In-Reply-To: <20190123131539.24699-1-Gerhard@Heift.Name>

Hello Gerhard,

Thanks for this contribution. I'm adding in Cc a few other people to
hopefully get their attention.

On Wed, 23 Jan 2019 14:15:39 +0100
Gerhard Heift <gerhard@heift.name> wrote:

> Before striping the binaries in $TARGET_DIR, the debug information is saved to
> $HOST_DIR/lib/debug using the following command as described in [1]:
> 
>   $ objcopy --only-keep-debug --compress-debug-sections $file
> 
> This allows remote debugging as described in section 8.12.2 with striped
> binaries in the final image. Therefore the build ID is included during the build
> process, if debug information is enabled via BR2_ENABLE_DEBUG.
> 
> [1] https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
> 
> Signed-off-by: Gerhard Heift <Gerhard@Heift.Name>

When you build with BR2_ENABLE_DEBUG=y and BR2_STRIP_strip=y, all the
libraries in $(STAGING_DIR) are installed with debugging symbols, and
they are not stripped.

As explained in our manual section 8.12.2, we provide a gdbinit that
tells gdb to look in $(STAGING_DIR) for debugging symbols.

Your patch has the effect of duplicating the debugging symbols: they
are already in $(STAGING_DIR), and they will now be duplicated in
$(HOST_DIR)/lib/debug. The only benefit that I can see is that the
gdbinit file is no longer needed because gdb will automatically look in
$(HOST_DIR)/lib/debug. But that can probably be resolved by making
$(HOST_DIR)/lib/debug a symlink to $(STAGING_DIR). Could you try this
instead ?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2019-02-04 16:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 13:15 [Buildroot] [PATCH] store debug information in $HOST_DIR/lib/debug Gerhard Heift
2019-01-30 20:28 ` Thomas De Schampheleire
2019-01-31 12:59   ` Gerhard Heift
2019-02-04 16:58 ` Thomas Petazzoni [this message]
2019-02-04 18:05   ` Thomas De Schampheleire
2019-02-04 18:19     ` Thomas Petazzoni
2019-02-04 18:27       ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204175809.7b710934@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.