[arch-general] Generating gdb debug logs for devs

Pekka Järvinen pekka.jarvinen at gmail.com
Wed Feb 1 23:53:28 UTC 2017


Hi,

I have segfaulting lxrandr and I was referred to
https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces after filing
bug report.
I've installed ABS, modified PKGBUILD and made my own /etc/makepkg-dev.conf

makepkg -sf --config /etc/makepkg-dev.conf generates the executable.

Still gdb gives very little info after running
cd lxrandr/pkg/lxrandr/usr/bin
gdb -ex "set logging file debug.log" -ex "set logging overwrite on" -ex
"thread apply all bt full" -ex "set logging on" -ex "run" -ex "backtrace"
-ex "frame 0" -ex "kill" -ex "quit" ./lxrandr

I'm guessing because I need to add debugging to libraries which lxrandr is
using too.

In the wiki there's
--- snip ---
Note: It is insufficient to simply install the newly compiled debug
package, because the debugger will check that the file containing the debug
symbols is from the same build as the associated library and executable.
You must install both of the recompiled packages. In Arch, the debug
symbols files are installed under /usr/lib/debug. See the GDB documentation
for more information about debug packages.
--- snip ---

But as a non c/c++ dev this doesn't say anything. What do I need to
install/run and where?

So could the wiki page be enhanced by adding concrete example(s)?

Original bug report: https://bugs.archlinux.org/task/51480

-- 
Pekka Järvinen


More information about the arch-general mailing list