Take the 2-minute tour ×

I'm trying to debug a Windows program compiled using MinGW's gcc that only ever segfaults when run outside of gdb (probably some race condition... lovely.) The problem is, when the program crashes and I'm not running GDB, I can't get a stack trace... I have the option to open up the program in MSVC when it crashes, but MSVC can't read gcc's debugging symbols and so the stack trace it gives me is useless.

Is there a way to get Windows to create a core dump that I can then later open in MinGW's gdb? Alternatively, is there a way to take MSVC's stack trace (which has raw addresses but no symbols) and use gcc to get a human-readable trace?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

windows does not create core files (on linux they are dumped by the kernel iirc) you can try to attach with gdb with the crash dialog opened but I doubt it will work

if you use msvc instead you can create a minidump debuggable in visualstudio but there is no way to create same dump with gcc

google made a software that you may find useful, but I'm not sure it can produce stuff with gcc


or you can set drmingw as jit debugger

drmingw -i

I'm sure it is possible to get something like a backtrace also on mingw, since mingw compiled llvm is able to dump a trace


looks like simpler but I've not tested it

compile with -g3 (and if you can -O0)

share|improve this answer

Your Answer


