From: Michael Matz <matz@suse.de>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: gdb-patches@sourceware.org, Mark Kettenis <kettenis@gnu.org>
Subject: Re: RFC: %ebp-based backtrace patch
Date: Tue, 07 Jul 2009 12:15:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0907071409490.29566@wotan.suse.de> (raw)
In-Reply-To: <y0mzlbhy3m8.fsf@fche.csb>
Hi,
On Mon, 6 Jul 2009, Frank Ch. Eigler wrote:
> Daniel Jacobowitz <drow@false.org> writes:
>
> > A number of Linux distributions are carrying the attached patch from
> > Michael Matz. [...]
> > https://bugzilla.novell.com/show_bug.cgi?id=390722#c25
> >[...]
> > * i386-tdep.c (i386_frame_cache): Assume anonymous functions use
> > a frame pointer.
> >[...]
>
> Could gdb partially disassemble such functions to check
> whether %ebp is likely being used as this heuristic expects?
Nope. We don't know the function borders. But there's another heuristic
that could potentially be useful: check if %ebp points not too far away
from %esp (and has a higher value). That way we would at least reject
functions that use %ebp to hold some low integer values.
Then we of course have the problem again of having to rely on %esp-4
containing the return address. That assumption doesn't really hold very
often. In fact it holds _only_ for frameless functions, of which there
aren't that many on x86. So we're screwed either way.
Ciao,
Michael.
next prev parent reply other threads:[~2009-07-07 12:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 18:33 Daniel Jacobowitz
2009-07-06 20:11 ` Frank Ch. Eigler
2009-07-06 20:21 ` Daniel Jacobowitz
2009-07-07 12:15 ` Michael Matz [this message]
2009-07-07 13:19 ` Frank Ch. Eigler
2009-07-07 13:49 ` Michael Matz
2009-07-06 21:57 ` Mark Kettenis
2009-07-07 12:00 ` Michael Matz
2009-07-07 13:00 ` Daniel Jacobowitz
2009-07-07 13:07 ` Mark Kettenis
2009-07-08 9:01 ` Mark Kettenis
2009-07-08 12:53 ` Daniel Jacobowitz
2009-12-27 16:59 ` Daniel Jacobowitz
2009-12-27 21:37 ` Mark Kettenis
2009-12-27 22:03 ` Daniel Jacobowitz
2010-02-01 19:46 ` 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=Pine.LNX.4.64.0907071409490.29566@wotan.suse.de \
--to=matz@suse.de \
--cc=fche@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=kettenis@gnu.org \
/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