From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Pascal Bach <pascal.bach@siemens.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: Debugging using sysroots and GDB
Date: Fri, 04 Mar 2016 15:30:33 +0000 [thread overview]
Message-ID: <1457105433.2804.30.camel@linuxfoundation.org> (raw)
In-Reply-To: <56D9964E.1070404@siemens.com>
On Fri, 2016-03-04 at 15:06 +0100, Pascal Bach wrote:
> > It really depends on your view of what the sysroot is used for. We
> > intentionally strip a variety of things out of it as things work
> > today
> > basically for size/performance reasons. If we start putting
> > debugging
> > source in there, it will become huge and this will image the size
> > of
> > things like eSDK and affect the speed of operations like building
> > from
> > sstate.
>
> From my point of view debugging from sysroots is not mandatory if I
> can find a suitable alternative.
> One thing I want to avoid is to install -dbg packages to my image.
>
> What I currently do is the following:
>
> 1. Enable Debugfs generation using: `IMAGE_GEN_DEBUGFS = "1"`
> 2. Switch debug split style to: `PACKAGE_DEBUG_SPLIT_STYLE = "debug
> -file-directory"`
>
> After building the image I end up with a rootfs and a rootfs-dbg
>
> 3. Extract both rootfs and rootfs-dbg somewhere (/home/projects)
> 4. Setup gdb with the following .gdbinit:
>
> ```
> set sysroot /home/projects/rootfs
> set debug-file-directory /home/projects/rootfs-dbg/usr/lib/debug
> set substitute-path /usr/src/debug /home/projects/rootfs
> -dbg/usr/src/debug
> ```
>
> With this setup I'm able to debug trough all libraries on the system.
> So so far so good.
>
> However for this to work I need to change the
> `PACKAGE_DEBUG_SPLIT_STYLE` to a non default and this made me wonder
> if I missed something.
> - Is there a way to get this setup working with the default ".debug"
> style of OE?
> - If not why is the .debug style the default instead of "debug-file
> -directory"?
> - Is there any documentation? I was unable to find anything more than
> [1] in the Yocto Mega manual.
> - Is there some best practice I missed?
Using this method is a supported approach. I'm a little surprised
.debug directories don't work. Have you tried just setting:
set sysroot /home/projects/rootfs-dbg
set substitute-path /usr/src/debug /home/projects/rootfs
-bbg/usr/src/debug
as I believe it should work with IMAGE_GEN_DEBUGFS=1 "out the box". If
it doesn't that is a bug and we should try and look into fixing that.
Cheers,
Richard
next prev parent reply other threads:[~2016-03-04 15:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 14:09 Debugging using sysroots and GDB Pascal Bach
2016-03-04 8:42 ` Pascal Bach
2016-03-04 11:20 ` Richard Purdie
2016-03-04 14:06 ` Pascal Bach
2016-03-04 15:30 ` Richard Purdie [this message]
2016-03-08 8:53 ` Pascal Bach
2016-03-08 11:22 ` Khem Raj
2016-03-08 14:09 ` Pascal Bach
2016-03-08 10:01 ` Andreas Müller
2016-03-08 10:24 ` Burton, Ross
2016-03-08 14:06 ` Pascal Bach
2016-03-08 19:57 ` Andreas Müller
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=1457105433.2804.30.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=pascal.bach@siemens.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox