[Dwarf-Discuss] Ambiguity in DWARF4 of debug_info_offset in .debug_aranges
Ron Brender
ron.brender@charter.net
Sun Aug 15 17:45:35 GMT 2010
Keith,
Re section 6.1.2, Lookup by Address, I believe you are correct that it
is ambiguous whether the debug_info_offset refers to the .debug_info or
.debug_types section.
I suspect this is an error that was introduced when the type signature
concept was introduced into DWARF and most mentions of .debug_info
needed to be augmented to mention .debug_types as well. In this case,
.debug_types should not be mentioned.
In practice, the .debug_types section by its nature will usually not
contain any entries for an entity that has an associated address in
memory--static data members might be the exception. Even in this case,
the data member definition should not be in the shared type description.
Re Section 2.5.1.5, Control Flow Operations, I think this is am
ambiguity whose origin is the same to the above. Most implementations
link the DWARF sections such that they are not loaded in memory and all
have a base address of zero; as a result, relocation information will
help to determine whether the offset is within .debug_info or debug_types.
These problems should be reported as Issues for resolution in DWARF 5.
Ron
-------------------
Keith Walker wrote:
> In section 6.1.2 of the DWARF3 spec. the debug_info_offset was defined as:
>
> "3. debug_info_offset (section offset)
>
> The offset from the beginning of the .debug_info section of the
> compilation unit header
> referenced by the set."
>
>
> However in section 6.1.2 of the DWARF4 spec. the definition has been
> changed to:
>
> "3. debug_info_offset (section offset)
>
> The offset from the beginning of the .debug_info or .debug_types
> section of the
> compilation unit header referenced by the set."
>
>
> However there doesn't appear to be any obvious way of determing whether
> the offset is into the .debug_info section or the .debug_types
> section. Have I missed something?
>
> [A similar issue also appears in section 2.5.1.5 for the definition of
> the DW_OP_call_ref operator; but in that case you might expect there
> to be some additional relocation information available to help determine
> which section is being referenced.]
>
> Keith Walker
>
>
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy
> the information in any medium. Thank you.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
More information about the Dwarf-discuss
mailing list