From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC/RFA] find_pc_sect_psymtab(): symbol table not always complete
Date: Wed, 19 Nov 2003 18:26:00 -0000 [thread overview]
Message-ID: <20031119182634.GA1423@nevyn.them.org> (raw)
In-Reply-To: <20031119181910.GD1067@gnat.com>
On Wed, Nov 19, 2003 at 10:19:10AM -0800, Joel Brobecker wrote:
> Hello,
>
> Re: http://sources.redhat.com/ml/gdb-patches/2003-11/msg00368.html
>
> The following change tweaks find_pc_sect_psymtab() to stop assuming
> that the symbol table will contain all symbols. So when we don't find
> a partial symtab containing a symbol at the same address as the minimal
> symbol we found, we return the symtab containing symbol which address
> is the closest to the given PC address.
>
> This fixes the problem reported in the message referenced above.
>
> As noted by Daniel J, the cleanest fix, in the long run, is probably to
> record accurate code ranges rather insted of the textlow/texthigh
> addresses. This is a more long term project which I wanted to tackle
> without the pressure of the users not being able to debug comfortably.
> This will be the subject of another post coming shortly.
>
> 2003-11-19 J. Brobecker <brobecker@gnat.com>
>
> * symtab.c (find_pc_sect_psymtab): Refine the search for the
> partial symtab corresponding to the given PC address, taking
> into account the fact that the symbol table might be incomplete.
>
> It has been tested on x86-linux with stabs & dwarf-2 with no regression.
> It has also been tested on mips-irix but on a 5.3-based version of GDB
> (we haven't moved to a more recent version of GDB on this platform yet,
> and the HEAD version is giving me some trouble that I need to sort out).
>
> Comments? OK to apply?
FWIW, this looks good to me, but I'd like another comment on the new
test to the effect of, the find_pc_sect_psymtab call will always return
the closest symbol below pc in tpst. Threw me for a moment how you
were just checking for the highest valued symbol.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-11-19 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 18:19 Joel Brobecker
2003-11-19 18:26 ` Daniel Jacobowitz [this message]
2003-11-20 0:24 ` Joel Brobecker
2003-12-02 16:15 ` Daniel Jacobowitz
2004-01-17 8:13 ` Joel Brobecker
2004-02-19 19:01 ` Elena Zannoni
2004-02-20 17:11 ` Joel Brobecker
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=20031119182634.GA1423@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.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