From: Adam Fedor <fedor@doc.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com, ezannoni@redhat.com, jimb@redhat.com
Subject: Re: RFA symtab: Fix for PR c++/1267 ("next" and shared libraries)
Date: Sun, 20 Jul 2003 03:30:00 -0000 [thread overview]
Message-ID: <3F1A0CB8.3040607@doc.com> (raw)
In-Reply-To: <20030719181817.GA11670@nevyn.them.org>
Daniel Jacobowitz wrote:
> This patch fixes c++/1267, a bug where stepping over a function call that
> went through the PLT (as happens when a -fPIC function makes a call to a
> globally visible symbol) would lose control of the inferior. I'll spare you
> the complete debugging session, as it really doesn't make much sense. But
> here's the root of the problem:
>
> When we called frame_pc_unwind on the sentinel frame, we got an address in
> the PLT. But when we called frame_func_unwind, we got "_init", in ".init",
> which is generally located right before the PLT. Then, we'd run the
> new-and-improved prologue unwinder on _init, and get some completely bogus
> information, since things weren't actually saved on the stack where it
> thought they were. This led to the unwound stack pointer being wrong for
> the step_resume breakpoint, so when we hit the step_resume breakpoint we
> kept going.
>
> I fixed this by changing lookup_minimal_symbol_pc_section to be paranoid
> about returning a minsym in the same section as the PC. Technically, at
> least on ELF targets, that doesn't _have_ to be true. I've never
> encountered an exception or a good reason for one, though. Does anyone see
> any pitfalls for this change? Symtab maintainers, is this patch OK?
>
> I believe this patch should also fix shlibs/1237, and may also fix
> shlibs/1280. Adam, could you check those?
>
Yes this fixes both cases (shlibs/1237 and shlibs/1280) for me. Thanks!
next prev parent reply other threads:[~2003-07-20 3:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-19 18:18 Daniel Jacobowitz
2003-07-20 3:30 ` Adam Fedor [this message]
2003-07-21 7:11 ` Jim Blandy
2003-07-21 12:53 ` Daniel Jacobowitz
2003-07-24 19:59 ` Jim Blandy
2003-07-24 20:58 ` Daniel Jacobowitz
2003-07-24 21:34 ` Adam Fedor
2003-07-25 0:12 ` Jim Blandy
2003-07-25 6:07 ` Eli Zaretskii
2003-07-25 12:58 ` Daniel Jacobowitz
2003-07-28 2:38 ` Daniel Jacobowitz
2003-07-21 16:18 ` Andrew Cagney
2003-07-21 16:27 ` Daniel Jacobowitz
2003-07-21 18:22 ` Andrew Cagney
2003-07-21 21:23 ` Daniel Jacobowitz
2003-07-25 16:15 Michael Elizabeth Chastain
2003-07-25 16:20 ` Daniel Jacobowitz
2003-07-25 16:24 Michael Elizabeth Chastain
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=3F1A0CB8.3040607@doc.com \
--to=fedor@doc.com \
--cc=drow@mvista.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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