This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: gdb on cygwin and debugging assert() or program segmentation faults


----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....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]