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


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.

Set the error_start parameter of the CYGWIN variable to gdb and then run
the program, and you should gdb launched and attached to the process
when it encounters a SEGV or abort().  See the users manual section
about $CYGWIN.

Brian


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