From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25846 invoked by alias); 14 Feb 2009 10:22:42 -0000 Received: (qmail 25837 invoked by uid 22791); 14 Feb 2009 10:22:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BARRACUDA_BRBL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 14 Feb 2009 10:22:36 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LYHfN-0001r8-JF for gdb@sources.redhat.com; Sat, 14 Feb 2009 10:22:33 +0000 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Feb 2009 10:22:33 +0000 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Feb 2009 10:22:33 +0000 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: GDB breakpoints, source lines Date: Sat, 14 Feb 2009 10:22:00 -0000 Message-ID: References: <1234603753.10693.8.camel@ceiriog.eclipse.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 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/msg00117.txt.bz2 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