[Top][All Lists]

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

[libunwind] problems parsing dwarf frame info on amd64 optimized code

From: Max Asbock
Subject: [libunwind] problems parsing dwarf frame info on amd64 optimized code
Date: Mon, 8 Mar 2004 10:49:45 -0800
User-agent: KMail/1.5.4

Hi all,

I am trying to parse the dwarf frame info on amd64 using 
libunwind which I had to slightly modify to run on amd64.
The parser works correctly in unoptimized code that uses frame pointers.
When I turn on the -O flag things fall apart. This is with gcc 3.2.2.
The parser finds two rules in the CIE:
CFA_def_cfa r7+0x8           (rsp)
CFA_offset r16 at cfa-0x8  (return address)
and then in the FDE it finds:
CFA_def_cfa_offset <offset>

This works for stepping from the first frame to the second, but
on the next step it fails, since the CFA is read again from r7 (rsp)
which hasn't changed. And it seems that the CFA <offset> is the
offset relative to the current CFA, not relative to the value in rsp.

I sent the same mail to the gcc mailing list since I am not sure if
this is a gcc problem or if the parser needs to do something different. 
Has anybody experienced similar problems?

Any help or hints would be greatly appreciated.


reply via email to

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