gdb on cygwin and debugging assert() or program segmentation faults
Dave Korn
dave.korn@artimi.com
Wed Jul 20 10:28:00 GMT 2005
----Original Message----
>From: Christopher Faylor
>Sent: 20 July 2005 03:37
> On Tue, Jul 19, 2005 at 07:13:17PM -0700, Brian Dessent wrote:
>> Kris Thielemans wrote:
>>
>>> I need to debug a C++ program that throws up an assert(). On Linux, I'm
>>> used to be able to run the program in gdb, and when the assert happens,
>>> the program stops (in the assert function) and I can do a back trace
>>> (e.g. info stack).
>>> On cygwin on the other hand, I just get the assert message, and then gdb
>>> says "Program exited normally". No backtrace possible.
> And, FWIW, gdb *does* do the right thing (i.e., the same thing as any
> UNIX system) when the program generates a genuine SIGSEGV. It just
> doesn't do anything for cygwin-specific signals like SIGABRT. It
> also won't stop if you do something like "kill (getpid (), SIGSEGV)" since
> that just sends a "cygwin signal".
By "genuine SIGSEGV" you mean a real x86 exception, and by "cygwin
signal", you mean writing a signal packet down the pipe to the signal
handling thread, yes?
So this implies that cygwin-native support could in theory be added to gdb
to make it respond to cygwin signals?
cheers,
DaveK
--
Can't think of a witty .sigline today....
More information about the Gdb
mailing list