From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25901 invoked by alias); 20 Jul 2005 02:09:16 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25685 invoked by uid 22791); 20 Jul 2005 02:09:10 -0000 Received: from dessent.net (HELO dessent.net) (66.17.244.20) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 20 Jul 2005 02:09:10 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1Dv417-0006L0-3j for gdb@sources.redhat.com; Wed, 20 Jul 2005 02:09:01 +0000 Message-ID: <42DDB33D.434A6CB2@dessent.net> Date: Wed, 20 Jul 2005 02:09:00 -0000 From: Brian Dessent MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Re: gdb on cygwin and debugging assert() or program segmentation faults References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Report: -5.9/5.0 ---- Start SpamAssassin results * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.0 AWL AWL: From: address is in the auto white-list ---- End SpamAssassin results X-SW-Source: 2005-07/txt/msg00204.txt.bz2 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