This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Minimal FDE




Alan Modra <amodra@bigpond.net.au> wrote on 01/09/2004 10:26:48:

...
> 0000000000046238 <.__gcc_personality_v0>:
>    46238:       7c 08 02 a6     mflr    r0
>    4623c:       fb 81 ff e0     std     r28,-32(r1)
>
> have corresponding eh_frame info:
>
> 00000040 00000034 00000044 FDE cie=00000000 pc=00046238..000462f0
>   DW_CFA_advance_loc: 8 to 00046240
>   DW_CFA_offset: r28 at cfa-32
>
> So the FDE is valid for pc's in the range 46238..462f0, but told to
> unwind starting from a pc of 46238 or 4623c, the unwinder will know
> that r28 should not be read from the stack frame..

My assumption is that when readelf -wf interprets the FDE and prints, "
DW_CFA_advance_loc: 8 to 00046240", it does so because initially the PC is
at 46238, and it encounters an "advance 8" instruction. The location 46240
is not in the DWARF instruction. Thus, a replicated FDE, for some disjoint
chunk (00050000..0005008) of this function, would have the header part of
the FDE indicate that range, encoded as 0x50000, 0x8, and the rest of the
FDE replicated as is. Given that, the readelf will interpret that FDE
something like..
00000040 00000034 00000044 FDE cie=00000000 pc=00050000..50008
  DW_CFA_advance_loc: 8 to 0005008
  DW_CFA_offset: r28 at cfa-32
Am I wrong?

Yaakov Yaari
IBM HRL




I am probably wrong in my assumptions on the DWARF code



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]