Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a stackdump from Cygwin executable

So I wrote buggy code that occasionally crash ... and creates a stackdump file.

Using addr2line I can figure out how the program got to the crash point by decoding the addresses on by one. Is there an alternative tool that can ease the debug using stack dumps? Is there a way to to load this information in Insight/Gdb?

like image 372
Gerhard Avatar asked Nov 26 '08 07:11

Gerhard


1 Answers

You can instruct Cygwin to start your gdb debugger just in time when an fault occurs. To achieve this, add error_start=action to the Cygwin environment variable:
export CYGWIN="$CYGWIN error_start=gdb -nw %1 %2"

Else you can have Cygwin generate a real core dump.
export CYGWIN="$CYGWIN error_start=dumper -d %1 %2"

like image 164
Gerhard Avatar answered Sep 22 '22 10:09

Gerhard