On 25-4-2012 20:34, mathog wrote:
The debugging tips for windows here:
http://wiki.inkscape.org/wiki/index.php/Debugging_Inkscape#Debugging_Tips_fo...
gives this example (extraneous text removed, program output in []):
gdb file inkscape.exe inkscape.dbg run Tekening.svg [ Program received signal SIGSEGV, Segmentation fault. 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () ] bt [ #0 0x005c94ec in Inkscape::UI::Widget::Scalar::setValue () #1 0x0044fc11 in Inkscape::CanvasXYGrid::readRepr () #2 0x0044de22 in Inkscape::CanvasXYGrid::onReprAttrChanged () ]
except that is NOT what I see on bt. What I see is always something like this:
(gdb) bt #0 0x7c912669 in stricmp () from C:\WINDOWS\system32\ntdll.dll #1 0x7c911649 in ntdll!RtlInitializeHandleTable () from C:\WINDOWS\system32\ntdll.dll #2 0x7c91911f in ntdll!RtlRealPredecessor () from C:\WINDOWS\system32\ntdll.dll #3 0x044bc000 in ?? () #4 0x00016000 in ?? () #5 0x000000f7 in ?? () #6 0x7c912482 in stricmp () from C:\WINDOWS\system32\ntdll.dll #7 0x77c2c3c9 in msvcrt!free () from C:\WINDOWS\system32\msvcrt.dll #8 0x003f0000 in ?? () #9 0x00000000 in ?? () (gdb)
Which is pretty useless. The Tips says that compiling with -g is not required. Is there some magic gdb incantation that must be applied to enable bt to show something useful, specifically, the names of the methods?
I think your gdb already shows the names of the methods :-) You are seeing the effects of a nasty crash, perhaps in a library somewhere. Perhaps you can 'simulate' a crash e.g. by intentionally dereferencing a NULL pointer, and then look at gdb's backtrace.
I wrote that -g is not required most of the time, although for some things it is still useful to have the extra detail (note that it increases build time a lot!). In any case, it is (in my experience) not needed for function names to show up in gdb. In your case, I think -g will not help.
Ciao, Johan