Re: How to catch GDB crash

Pedro Alves
2008-06-23T18:36:53Z

A Monday 23 June 2008 19:23:03, Eli Zaretskii wrote:
> > From: Michael Snyder <msnyder@specifix.com>
> > Cc: gdb@sourceware.org
> > Date: Mon, 23 Jun 2008 10:12:04 -0700
> >
> > You're running on a Windows host, right? Doesn't Windows have
> > some mechanism for automatically catching a program that is
> > crashing, and holding it for the debugger?

> That's true, but you need special code in the debugger to be able to
> work like that (it's called JIT debugging, btw). And GDB doesn't
> (yet) have such code.

You can set error_start in the CYGWIN environment variable
to point at GDB's executable to have GDB start automatically
on an exception (the op reported --host=i686-pc-cygwin), and,

for native Windows apps, there is some registry key (I don't
remember which) you can set to point to a JIT debugger. Probably
a little exe wrapper is needed to translate the incoming args
to GDB args, that's all. I can't see what changes in GDB
would be required?

--
Pedro Alves