public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Paul Koning <pkoning@equallogic.com>
Cc: gdb@sources.redhat.com
Subject: Re: find_pc_partial_function may produce the wrong answer
Date: Wed, 20 Jul 2005 14:33:00 -0000	[thread overview]
Message-ID: <20050720143326.GA31003@nevyn.them.org> (raw)
In-Reply-To: <17118.24446.528000.56862@gargle.gargle.HOWL>

On Wed, Jul 20, 2005 at 10:28:14AM -0400, Paul Koning wrote:
> I was tracking down a problem in my (modified) gdb, which showed up
> when doing callstack tracing by reading the prologue.  (mips-tdep can
> do that, and in my version it does it most of the time.)
> 
> The problem is that find_pc_partial_function is used to find the start
> of the function, and it was producing the wrong answer.  Specifically,
> it produces the wrong answer when the function is in a shared library.
> 
> The cause of the problem is that find_pc_partial_function looks up the
> symbol in the msymtab, and that contains only external symbols, not
> static symbols.  The comments in the source code explicitly claim that
> it DOES contain static symbols, but "maint print msymtab" clearly
> shows that it doesn't.  At least not for MIPS shared libraries...

Is the shared library stripped?  I am absolutely positive that the
minimal symbol table will include the static symtab - as long as there
is one.

If for some reason in your modified GDB this is not the case, figure
out why not.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

  reply	other threads:[~2005-07-20 14:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-20 14:28 Paul Koning
2005-07-20 14:33 ` Daniel Jacobowitz [this message]
2005-07-20 15:38   ` Paul Koning
2005-07-20 16:17     ` H. J. Lu
2005-07-20 16:24       ` Paul Koning
2005-07-20 17:09   ` Paul Koning
2005-07-20 17:13     ` 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=20050720143326.GA31003@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=pkoning@equallogic.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).