From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29388 invoked by alias); 23 Jun 2003 20:11:36 -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 14606 invoked from network); 23 Jun 2003 20:02:40 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 23 Jun 2003 20:02:40 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19UXXI-00050p-00; Mon, 23 Jun 2003 15:03:32 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19UXWN-0003D0-00; Mon, 23 Jun 2003 16:02:35 -0400 Date: Mon, 23 Jun 2003 20:11:00 -0000 From: Daniel Jacobowitz To: MONWHEA JENG Cc: gdb@sources.redhat.com Subject: Re: Breakpoints in constructor/destructor Message-ID: <20030623200234.GA12219@nevyn.them.org> Mail-Followup-To: MONWHEA JENG , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00465.txt.bz2 On Mon, Jun 23, 2003 at 02:56:33PM -0500, MONWHEA JENG wrote: > > Hi, > > I just downloaded gdb onto cygwin. I found it pretty > wonderful, but there's one thing I'm completely baffled by. I > can't seem to set breakpoints in constructors or destructors > in my C++ programs. I wrote a simple program that does nothing but > create and destroy a simple object. When I step through it, I can see > my cout statements in the constructors and destructors being called. > But if I set breakpoints at these lines, the gdb doesn't stop there. > The program is reproduced below, but it's pretty simple---there's > not much to see. I read the gdb manual, but saw no mention of > any special issues related to constructors and destructors. And > I see that there was a thread earlier this year on "breakpoints > in constructors," but unfortunately, I found it incomprehensible. > > Any help would be appreciated. Or, any suggestion on how > I could have figured this out on my own, from the gdb manual > or other source. Neither, sorry - this is still an open problem, and we're still trying to find a good solution. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer