tags:

views:

103

answers:

2

I have some crashes in some C code, built without debugging symbols, and I have only a backtrace with the absolute addresses of the call stack. This is on windows (64 bits). I am more of a linux guy, so I am a bit lost at how to look into debugging this - on Linux, I would run the code under valgrind, but AFAIK, no such tool exists for windows 64 bits.

What are my options ? I can modify the C code at will, but I cannot build it with the debug symbols. The reason why I cannot build with debugging symbols is that my binary is not built with MS tools (it is built with mingw-w64).

+1  A: 

You need to generate a map file. A map file lists out the addresses of various public symbols (functions, globals etc) in your executable/binary. Usually it can be generated by passign on a special switch to the linker.

MSDN reference for /MAP

SDX2000
I am not using MS compilers, so I cannot use this - I edited my question to make this clearer
David Cournapeau
What compiler are you using then? Map files are an (almost) universal concept.
SDX2000
David is using MinGW, and according to the MinGW FAQ, it can produce map files: http://www.cs.colorado.edu/~main/cs1300/doc/mingwfaq.html#debugging
RichieHindle
Thanks for the link.
SDX2000
Ah, nice, this indeed sound exactly like what I need.
David Cournapeau
A: 

You should probably be using the ming version of gdb, which can understand the symbols embedded in the binary.

Paul Betts