This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Dumping core on windows?
Ben Greear wrote:
> After hours or days, my application crashes. It's not overly convenient for me
> to attach gdb to the process(es), but it can be done if that is the only way.
Since your app is not a Cygwin program you can't just set 'error_start'
in $CYGWIN. But you can do the equivalent to set dumper as the windows
JIT debugger. Set "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AeDebug\Debugger" to a REG_SZ of the filename and args
of dumper. Use "%ld" to represent the PID. e.g.
"c:\cygwin\bin\dumper.exe myapp %ld" will create myapp.core when the
program faults. Set "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AeDebug\Auto" to a REG_SZ of "1" to have this happen
without the popup "This application has performed an illegal operation,
... [Debug] [Close]". However, if you do this then there will be no
indication of the fault -- other than the existance of the core file and
your app no longer running (and possibly an entry in the event log) --
so you might want to leave auto at 0 if you want to see when the fault
occurs.
Brian