On 7/16/20 2:57 PM, David Blaikie wrote:


On Thu, Jul 16, 2020 at 2:05 PM Michael Eager <ea...@eagercon.com
    You appear to be starting with a counterfactual premise and using that
    to postulate a problem where none exists.


Sorry - I seem to be misunderstanding what you mean by "there are no restrictions on where code or data are located" - I understood that to mean different bits of code could be in different segments.

It does no one good when you take a comment about one point (.debug_aranges) and contort it to apply to an unrelated point (DW_AT_segment).

Reread my previous comment about the meaning of segment as used in DW_AT_segment. You apparently want it to mean something different.

    As previously stated, DW_AT_segment provides a way to represent x86
    segmented addressing.  Each segmented address is mapped to an
    address in
    a linear address space.  The mapped address can be used in the ranges.


Where does the spec say that? How do we construct an answer to the original question from this thread from the words in the spec?

There are many things that the spec does not say about implementation. We sometimes suggest best practices, but we don't require implementors to follow them. The DWARF spec is also not written to prevent implementors from doing things badly.

Providing an example of the use of DW_AT_segment provides a strong hint of how it may be used, without constraining it to one specific architecture, or preventing it from being used in other ways. When we have had discussions about whether to give more specific implementation details, we have frequently decided to let matters go with a hint, rather than a prescription.

While we cannot prevent people from misreading or misinterpreting the DWARF spec, we try to answer questions as they arise.

Having been told how address ranges might be implemented for x86 segmented addresses, is there more to add?

I don't especially have a need for segmented addresses myself - so I may not be the best person to push for changes/clarifications here - I was trying to answer the original poster's question using what I can see from the spec.

It's rarely beneficial to get into a hypothetical debate. If you have no use case and are just postulating problems for which there is no evidence, there isn't much to be gained pursuing this.

    You appear to be reading the standard to mean something other than what
    it says.  FORM_addrx is a method to compress FORM_addr, nothing more.


But it describes segmented addresses - it says so specifically, doesn't it? Using the same wording that is used to describe segmented addresses elsewhere in the spec.

DWARF uses the same description for segmented addresses almost everywhere that an address is used. This is for consistency. The meaning is the same everywhere.


--
Michael Eager
_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

Reply via email to