libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] walking the callstack on an x86 machine


From: David Mosberger-Tang
Subject: Re: [libunwind] walking the callstack on an x86 machine
Date: Mon, 18 Sep 2006 09:31:13 -0600

Alex,

On 9/15/06, Alex Shye <address@hidden> wrote:

I have been looking around for information on how to accurately and
efficiently walk the call stack on an x86 machine and figured it would
probably be helpful just to ask for some help on this mailing list.

x86 variable length ISA, as well as programs compiled without frame pointers
present problems to stack walking.  I assumed that there may be some papers
on techniques for stack walking and tradeoffs as far as accuracy of stack
walking and overhead of performing the stack walk.  However, when googling,
I have not found much besides this website which has been helpful:

http://help.madshi.net/TraceMethods.htm

Does anyone else know of other resources on this?

Any help would be greatly appreciated.

The standard way of handling this for Linux/Unix-like OSes on x86 (and
several other architectures) is to describe frame-related instructions
in a procedure with DWARF2/3 annotations.  You may want to read
Section 6.4 (Call Frame Information) in the DWARF manual.  You can
find this document here:

 http://www.eagercon.com/dwarf/Dwarf3-draft7-011029.pdf

You could also look at the libunwind files src/dwarf/* and
include/dwarf* to see actual working code.

Hope this helps,

 --david
--

Mosberger Consulting LLC, http://www.mosberger-consulting.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]