This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb on cygwin and debugging assert() or program segmentation faults
- From: Brian Dessent <brian at dessent dot net>
- To: gdb at sources dot redhat dot com
- Date: Tue, 19 Jul 2005 19:13:17 -0700
- Subject: Re: gdb on cygwin and debugging assert() or program segmentation faults
- References: <loom.20050720T002246-371@post.gmane.org>
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