Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: PAUL GILLIAM <pgilliam@us.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] "fix" a problem where a breakpoint would be associated 	with  the wrong source
Date: Tue, 14 Feb 2006 14:03:00 -0000	[thread overview]
Message-ID: <20060214140324.GA21812@nevyn.them.org> (raw)
In-Reply-To: <1139887628.21920.116.camel@dufur.beaverton.ibm.com>

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


      reply	other threads:[~2006-02-14 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02  1:25 PAUL GILLIAM
2006-02-02  1:27 ` Daniel Jacobowitz
2006-02-10  2:12   ` PAUL GILLIAM
2006-02-10  5:33     ` Daniel Jacobowitz
2006-02-14  3:25       ` PAUL GILLIAM
2006-02-14 14:03         ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060214140324.GA21812@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=pgilliam@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox