This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Dumping core on windows?
On Wed, Nov 16, 2005 at 05:38:45PM -0800, Brian Dessent wrote:
>Ben Greear wrote:
>>Is there a way to get the program name programatically so that this
>>works with any application? For instance, I'm using this value for
>>Debugger:
>
>Not that I know of. Of course, you could easily write a wrapper for
>dumper that uses the PID to get the image name of the faulting process,
>and calls dumper with that filename. Or just patch dumper to do this.
>
>>Also, is there a way to cause a fault in a program for testing, similar
>>to 'kill -11 pid' ?
>
>You can just run dumper directly with the pid of the running process to
>generate a core file without causing a fault. However this will cause
>the process to terminate (something about a win32 limitation of not
>being able to detach from a process without killing it.)
This limitation does not exist on XP or greater. Corinna Vinschen modified
gdb to take advantage of that fact.
See DebugSetProcessKillOnExit.
cgf