On 9/26/19 3:33 AM, Jayvee Neumann via Dwarf-Discuss wrote:
Dear DWARF experts,

I have a question regarding the attribute DW_AT_segment. I do not quite understand how to handle it, yet. It can appear in a DIE (or its parent) whenever DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges, DW_AT_entry_pc, or a location description that evaluates to an Address are used. It can contain a location expression itself. So it can depend not only on compile-time information but also on run-time information.

Assume, I have an attribute DW_AT_low_pc. If there is no DW_AT_segment, this attribute is simply the low_pc as it was determined during compile-time. While debugging, this value has to be relocated if the image had been relocated. If there is a DW_AT_segment expression is relocation still necessary? Evaluating the expression could also incorporate the usage of run-time information and relocated addresses (i.e. the DS/CS/SS registers).

I hope I was able to articulate my question well, English is not my native language.

Kind Regards
Jayvee

Your question is quite clear, but we don't know the context. What architecture are you working with and what ar you trying to do?

As Ron mentioned, AT_segment is intended to support architectures like the X86 where an address is composed of a [segment,offset] pair. Most architectures do not use segments.

--
Michael Eager    ea...@eagerm.com
1960 Park Blvd., Palo Alto, CA 94306
_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

Reply via email to