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: Alex Shye
Subject: Re: [libunwind] walking the callstack on an x86 machine
Date: Mon, 18 Sep 2006 12:57:59 -0400

Hi David,

Thanks for the reply.  I don't know much about the DWARF format I as I understand, it is included with compiling with debug information, correct?

I guess I didn't state my question clearly enough, but what if you only have stripped binaries without any debug information to work with?  Are there any resources for stack walking in such a scenario?

Thanks,

--alexshye


On 9/18/06, David Mosberger-Tang <address@hidden> wrote:
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]