[Dwarf-Discuss] target address dependency of the FDE header in DWARF CFI
David Anderson
davea42@earthlink.net
Sat Dec 10 23:02:46 GMT 2011
On 12/10/2011 10:04 AM, Eli Bendersky wrote:
>>> The CU specific address_size is used for that CU's CIE/FDE set.
> David, could you elaborate - what to you mean by "that CU's CIE...".
> How do I know to which CU a CIE belongs?
Each FDE has an initial_location and address_range indicating what
instruction area
is applicable to the FDE. That FDE refers to a specific CIE. A
CU also applies
to a range of addresses (some CU DIEs have DW_AT_low_pc or
DW_AT_ranges, but
certainly the functions in a CU will have addresses or address ranges).
So using an address as the key, find the CU applicable and the FDE
applicable (which determines
the CIE applicable). Hence finding a CU that 'owns' (speaking
loosely) a particular CIE.
In other words, the ownership is implicit in the DWARF data, not explicit.
It's normal for a single CU to have a single CIE, but that is a detail,
and CIEs can
be split or merged without changing the notions here (sharing a CIE
across multiple
CUs could make things one's dwarf-reading code a little messier).
Normally the address-association here is really simple, and debuggers
have all the lookup
tools in hand to do the association easily.
Hope this makes sense. Always possible I'm just wrong :-)
DavidA.
--
It's important to ask yourself, when you're considering how much greener the grass is on the other side, if you've even been watering yours. -- Unknown
More information about the Dwarf-discuss
mailing list