Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix for searching for data symbols
Date: Sat, 19 Jan 2002 10:05:00 -0000	[thread overview]
Message-ID: <20020119130506.A2201@nevyn.them.org> (raw)
In-Reply-To: <3C49B256.3B38@redhat.com>

On Sat, Jan 19, 2002 at 09:52:22AM -0800, Michael Snyder wrote:
> Daniel Jacobowitz wrote:
> > 
> > This patch fixes the problem I described in:
> >         http://sources.redhat.com/ml/gdb/2002-01/msg00223.html
> > 
> > Basically, since we use the bounds of the text segment to search for symbols
> > in find_pc_*, don't let them return a bogus answer for a symbol we know is
> > off in data land.
> > 
> > OK to commit, or does anyone prefer a different approach to this?
> 
> Is there any chance that a data symbol that we don't want
> would shadow a text symbol that we do want?  Eg. maybe in
> one module we have
> 	static int foo;
> and in another we have
> 	extern int foo(void);
> Maybe they are even in separate objfiles (shared libs).
> Maybe lookup_minimal_symbol will find the wrong one first, 
> and your change will terminate the search before we would
> have found the right one?
> 
> Just speculating...

Well, we aren't using lookup_minimal_symbol; we're using
lookup_minimal_symbol_by_pc_section.  I don't think it's possible for
it to get the wrong one, since it's by address instead of by name.


-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-01-19 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-19  9:33 Daniel Jacobowitz
2002-01-19  9:56 ` Michael Snyder
2002-01-19 10:05   ` Daniel Jacobowitz [this message]
2002-01-19 11:26     ` Michael Snyder
2002-01-29 21:56 ` Daniel Jacobowitz
2002-01-30 15:26 ` Elena Zannoni
2002-01-30 21:04   ` Daniel Jacobowitz

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=20020119130506.A2201@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@redhat.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