[Dwarf-Discuss] unwinding stack (CIE/FDE)

Saurabh saurabhcv@yahoo.com
Tue Aug 3 23:40:37 GMT 2010


Assuming my pc is 0x2010ddc, the FDE below applies

00001954 0000001c 0560e358 FDE cie=f6066110 pc=02010d70..02010e06
? DW_CFA_advance_loc: 0 to 02010d70
? DW_CFA_same_value: r31
? DW_CFA_advance_loc: 0 to 02010d70
? DW_CFA_same_value: r31
? DW_CFA_advance_loc: 0 to 02010d70
? DW_CFA_def_cfa_offset: 8
? DW_CFA_advance_loc: 0 to 02010d70
? DW_CFA_offset: r27 at cfa+0
? DW_CFA_advance_loc: 0 to 02010d70
? DW_CFA_def_cfa_reg: r27
? DW_CFA_nop
00001974 0000001c 0560e358 FDE cie=f6066110 pc=02010e08..02010e8c

00001640 0000000c ffffffff CIE
? Version:?????????????? 1
? Augmentation:????????? ""
? Code alignment factor: 1
? Data alignment factor: -4
? Return address column: 31
? DW_CFA_def_cfa: r28 ofs 0

I don't see the "restore operations of epilogue". Is the producer not following 
the specification? 

If its a bug, can I still find return address by just the prologue?

Thanks



________________________________
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Saurabh <saurabhcv at yahoo.com>
Cc: dwarf-discuss at lists.dwarfstd.org
Sent: Tue, August 3, 2010 2:28:15 PM
Subject: Re: [Dwarf-Discuss] unwinding stack (CIE/FDE)

On Tue, Aug 3, 2010 at 2:09 PM, Saurabh <saurabhcv at yahoo.com> wrote:

> I think my understanding is incorrect since these steps don't?work as the
> return register is fixed at 31(blink) in my case.

You'll need to find where previous value of "blink" register is stored;
as described you'll only be able to unwind one level.

You may also want to look at libunwind: http://www.nongnu.org/libunwind

-- 
Paul Pluzhnikov



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20100803/a4e635e2/attachment.htm>



More information about the Dwarf-discuss mailing list