From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29075 invoked by alias); 20 Jul 2005 10:28:40 -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 28781 invoked by uid 22791); 20 Jul 2005 10:28:30 -0000 Received: from host217-40-213-68.in-addr.btopenworld.com (HELO SERRANO.CAM.ARTIMI.COM) (217.40.213.68) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 20 Jul 2005 10:28:30 +0000 Received: from mace ([192.168.1.25]) by SERRANO.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.211); Wed, 20 Jul 2005 11:28:19 +0100 From: "Dave Korn" To: Subject: RE: gdb on cygwin and debugging assert() or program segmentation faults Date: Wed, 20 Jul 2005 10:28:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20050720023659.GG26817@trixie.casa.cgf.cx> Message-ID: X-SW-Source: 2005-07/txt/msg00206.txt.bz2 ----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....