From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: gdb@sources.redhat.com
Subject: Re: gdb on cygwin and debugging assert() or program segmentation faults
Date: Wed, 20 Jul 2005 02:37:00 -0000 [thread overview]
Message-ID: <20050720023659.GG26817@trixie.casa.cgf.cx> (raw)
In-Reply-To: <42DDB33D.434A6CB2@dessent.net>
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.
>
>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.
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".
cgf
next prev parent reply other threads:[~2005-07-20 2:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-19 22:40 Kris Thielemans
2005-07-20 2:09 ` Brian Dessent
2005-07-20 2:37 ` Christopher Faylor [this message]
2005-07-20 10:28 ` Dave Korn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050720023659.GG26817@trixie.casa.cgf.cx \
--to=cgf-no-personal-reply-please@cygwin.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).