From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 798 invoked by alias); 13 Nov 2007 19:28:53 -0000 Received: (qmail 773 invoked by uid 22791); 13 Nov 2007 19:28:52 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 13 Nov 2007 19:28:48 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Is1R4-0005at-3D for gdb@sources.redhat.com; Tue, 13 Nov 2007 19:28:34 +0000 Received: from 77.246.241.246 ([77.246.241.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Nov 2007 19:28:34 +0000 Received: from ghost by 77.246.241.246 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Nov 2007 19:28:34 +0000 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: Multiple breakpoint locations Date: Tue, 13 Nov 2007 19:28:00 -0000 Message-ID: References: <18233.63439.953202.586908@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.4 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00099.txt.bz2 Nick Roberts wrote: > > The new code for breakpoints with multiple locations looks very good and > addresses a common complaint about GDB. I have a couple of points and > apologise if they have already been discussed. > > Folowing the example in the manual: > > Num Type Disp Enb Address What > 1 breakpoint keep y > stop only if i==1 > breakpoint already hit 1 time > 1.1 y 0x080486a2 in void foo() at > t.cc:8 > 1.2 y 0x080486ca in void foo() at > t.cc:8 > > > 1) I can enable/disable 1.1 and 1.2 but not delete them: > > (gdb) dis 1.1 > > Num Type Disp Enb Address What > 1 breakpoint keep y > stop only if i==1 > breakpoint already hit 1 time > 1.1 n 0x080486a2 in void foo() at > t.cc:8 > 1.2 y 0x080486ca in void foo() at > t.cc:8 > > (gdb) d 1.1 > warning: bad breakpoint number at or near '1.1' Well, you can't really delete a location -- if breakpoint expression corresponds to 20 addresses, that's the way it is -- you cannot delete some of those addresses from the program ;-) > 2) I can enable/disable 1 and this appears to enable/disable all the > locations. > Perhap this could be documented in the manual. Well yes. Patches welcome ;-) > 3) I created this breakpoint by specifying the line but if I do: > > b foo() > > or any variant I can think of, I just get a pending breakpoint as GDB > doesn't recognise the location. Can such locations be specified on the > command line by name? Does b 'void foo()' work better? - Volodya