From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15526 invoked by alias); 14 Feb 2009 12:03:02 -0000 Received: (qmail 15518 invoked by uid 22791); 14 Feb 2009 12:03:01 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 14 Feb 2009 12:02:56 +0000 Received: from unknown (HELO ceiriog.eclipse.co.uk) ([91.84.184.140]) by smtpout.karoo.kcom.com with ESMTP; 14 Feb 2009 12:02:53 +0000 Received: from prw by ceiriog.eclipse.co.uk with local (Exim 4.69) (envelope-from ) id 1LYJET-00049M-4Z; Sat, 14 Feb 2009 12:02:53 +0000 Subject: Re: GDB breakpoints, source lines From: Peter Wainwright To: Vladimir Prus Cc: gdb@sources.redhat.com In-Reply-To: References: <1234603753.10693.8.camel@ceiriog.eclipse.co.uk> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sat, 14 Feb 2009 12:03:00 -0000 Message-Id: <1234612972.15489.3.camel@ceiriog.eclipse.co.uk> Mime-Version: 1.0 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: 2009-02/txt/msg00118.txt.bz2 On Sat, 2009-02-14 at 13:22 +0300, Vladimir Prus wrote: > Peter Wainwright wrote: > > > Hi, > > > > I'm the maintainer of DDD. I have some questions about the intent of > > the gdb breakpoints. > > > > "info break" returns several lines for each breakpoint, e.g. > > > > 2.1 y 0x00007f2e2090c4d4 in > > VoxelBuffer::buffer_type() const > > at ../VoxelBuffer.cc:95 > > 2.2 y 0x00007f2e2090c540 in > > VoxelBuffer::buffer_type() const at ../VoxelBuffer.cc:95 > > 2.3 y 0x00007f2e2090c5ac in > > VoxelBuffer::buffer_type() const > > at ../VoxelBuffer.cc:95 > > > > The info page on breakpoints mentions 3 use cases: constructors, > > templates, and inlined functions. In all 3 cases the multiple locations > > are generated from a single source line. However, the "info break" > > display shows a source file and line number for each location. > > > > My question is: are there any circumstances in which you can get a > > different source file or line for each location? > > There should be none, except that we had a bug report whereby GDB would > create multiple location breakpoint where each location has the same > line number and file basename, but different directories. > > I think you better assume the source location is always the same. You might > consider if you actually want to display individual locations at all -- > unless the user is in position to do something with address, that information > is of no use. > > - Volodya Thanks, that makes things a bit simpler. We do need to parse and record the information for each location, because DDD displays a "glyph" to indicate the breakpoint location in the machine code display window. But at least it seems we can make do with only one glyph for the source code window. (I suppose I can imagine cases in which the user might want to enable/disable the individual locations separately, but that seems to be a rather obscure case). Peter > >