From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30197 invoked by alias); 14 Feb 2006 14:03:31 -0000 Received: (qmail 30185 invoked by uid 22791); 14 Feb 2006 14:03:30 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 14 Feb 2006 14:03:28 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F90m5-0005gG-AS; Tue, 14 Feb 2006 09:03:25 -0500 Date: Tue, 14 Feb 2006 14:03:00 -0000 From: Daniel Jacobowitz To: PAUL GILLIAM Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] "fix" a problem where a breakpoint would be associated with the wrong source Message-ID: <20060214140324.GA21812@nevyn.them.org> Mail-Followup-To: PAUL GILLIAM , gdb-patches@sources.redhat.com References: <1138843590.1423.106.camel@dufur.beaverton.ibm.com> <20060202012733.GA19141@nevyn.them.org> <1139537659.1423.175.camel@dufur.beaverton.ibm.com> <20060210053352.GA11956@nevyn.them.org> <1139887628.21920.116.camel@dufur.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1139887628.21920.116.camel@dufur.beaverton.ibm.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00300.txt.bz2 On Mon, Feb 13, 2006 at 07:27:08PM -0800, PAUL GILLIAM wrote: > There is a compilation unit that uses constructors/destructors for some class. > There is a .text section for it in the executable, followed by '.gnu.linkonce...' > sections for those constructors/destructors. Then there is a .text section for > the compilation unit that contains the function we are trying to set a breakpoint > on. Then comes a .text section for part of the implementation for that class. > > The high/low pc values for the compilation unit for that last .text section are > not given in it's compilation unit DIE. GDB computes high/low pc values, but these > are bogus because the code for the compilation unit is not contiguous. When GDB > searches for the psymtab that contains the function where the breakpoint was set, > it finds the wrong one because of these bogus high/low pc values. It then returns > the 'best' sal from the wrong psymtab which has nothing to do with the function being > breakpointed. We've got lots of hacks thrown around to try to make this case work. It might be possible to add another to fix your variant. But, it sounds like recording discrete range information would be a better idea. -- Daniel Jacobowitz CodeSourcery