* Best practice in debugging target software
@ 2016-02-12 7:56 Pascal Bach
0 siblings, 0 replies; only message in thread
From: Pascal Bach @ 2016-02-12 7:56 UTC (permalink / raw)
To: yocto@yoctoproject.org
Hello everybody
I'm currently trying to figure out the easiest way to debug an executable on a target.
What I ended up is the following approach:
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?
Regards
Pascal
[1] http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#platdev-gdb-remotedebug-setup
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-12 8:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 7:56 Best practice in debugging target software Pascal Bach
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.