libunwind-devel
[Top][All Lists]
Advanced

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

Re: [libunwind] using dwarf_step on x86 and amd64


From: David Mosberger
Subject: Re: [libunwind] using dwarf_step on x86 and amd64
Date: Thu, 4 Mar 2004 15:01:41 -0800

>>>>> On Wed, 3 Mar 2004 17:19:22 -0800, Max Asbock <address@hidden> said:

  Max> I have been trying the dwarf parser in the bk tree of
  Max> libunwind.  When I run it on x86 it fails. The callback()
  Max> function complains it doesn't find all the required
  Max> information. It either finds text or eh_header but not both
  Max> together. Are there any compiler options that I need to produce
  Max> all the info? (gcc 3.3.1) If I run the same program compiled
  Max> with the same gcc options on amd64 (as a 64-bit binary)
  Max> callback() finds everything alright. This is with gcc 3.2.2.

I believe the theory is that on x86, you should get the necessary
unwind info with -fexceptions (or compile with g++).  Last time I
tried, it worked fine with the compiler that ships with RH9 (something
based on gcc 3.2.x) but not with gcc 3.3.  At first, I thought this
was a bug in the Debian compiler and I brought it up with the
maintainer, but then he checked and confirmed that the same behavior
exists in the main-line gcc 3.3.3.  I don't have a satisfactory answer
yet why this is so.

  Max> After some tweaking the parser now finds the dwarf unwind info
  Max> and seems to parse it correctly. Only the apply_reg_state()
  Max> function doesn't seem to move things to the next frame. I am
  Max> still looking into that.

Could be that something is wrong with the register numbering.  If you
turn on libunwind-debugging, it should help debugging such problems
(run configure with option --enable-debug, rebuild the library, then
run the test-program with environment variable UNW_DEBUG_LEVEL set to
16).

        --david


reply via email to

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