Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: drow@false.org, gdb-patches@sourceware.org
Subject: Re: RFC: %ebp-based backtrace patch
Date: Tue, 07 Jul 2009 12:00:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0907071330270.29566@wotan.suse.de> (raw)
In-Reply-To: <200907062157.n66LvSVF007634@brahms.sibelius.xs4all.nl>

Hi,

On Mon, 6 Jul 2009, Mark Kettenis wrote:

> Makes sense to me.  If we have no clue where we are anymore, taking
> the gamble that %ebp is a valid frame pointer probably has better odds
> than that %esp points to a valid frame.  This will need a comment
> though.  I'll take care of that.
> 
> There is one potential problem though.  IIRC early versions of the
> vsyscall DSO did not have embedded debug information.

That was indeed quite some time ago, probably not useful to care anymore.  
But I took a quick look at the current implementations.  Some of them use 
%ebp frames, so those would be fine even without debug info (and broken 
with the current heuristic), and some use no frame at all (hence the 
heuristic of %esp-4 would work).  The latter will use the frame of the 
caller with the new heuristic, which is not ideal but somewhat okay when 
that caller itself has a %ebp frame.  If it hasn't, everything is off.  
All of that is problematic only for non-debug-info vsyscalls/vDSOs, which 
I'd hope don't exist in practice anymore.

One thing of note: we meanwhile use the Fedora package of gdb, mostly 
unchanged.  One patch of it interacts with the new heuristic, namely 
gdb-6.5-bz218379-ppc-solib-trampoline-fix.patch .  That patch isn't 
necessary anymore and in any case never really did what it intended.  The 
result of it is that the frame unwinder magically always finds a 
"function" (the fake minimal symbols for trampolines, not to be confused 
with "function@plt" symbols) for each program counter, even of length 
zero.  That breaks the heuristic again.


Ciao,
Michael.


  reply	other threads:[~2009-07-07 12:00 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
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 [this message]
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.0907071330270.29566@wotan.suse.de \
    --to=matz@suse.de \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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