[arch-general] Generating gdb debug logs for devs

Christoph Gysin christoph.gysin at gmail.com
Fri Feb 3 14:50:18 UTC 2017


On Fri, Feb 3, 2017 at 2:37 AM, Pekka Järvinen via arch-general
<arch-general at archlinux.org> wrote:
> This finally provided results!
>
> main (argc=<optimized out>, argv=<optimized out>) at lxrandr.c:783
> 783    fixed = LVDS ? LVDS : monitors->data;

At this point, lxrandr has crashed and you are left at the gdb prompt.
Type "bt" to create a backtrace showing all functions and line numbers
of the current call stack. In your example, lxrandr is crashing in
main(), so there is only one stack frame.

Also, it might help the developers to print the values of relevant
variables. In the above example, it looks like LVDS evaluates to
false, and monitors is NULL, causing the segfault. You can confirm
this by printing those variables at the prompt, and include it in your
bug report:

(gdb) p LVDS
...
(gdb) p monitors
...

> I would suggest mentioning this manual compiling to the wiki page
> https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces so that others
> don't need to use hours/days figuring out this again.

Manual compiling is not the recommended way.

Chris
-- 
echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org at fr33z3


More information about the arch-general mailing list