[llvm-dev] DWARF .debug_aranges data objects and address spaces

Pavel Labath via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 17 00:02:28 PDT 2020


On 16/03/2020 18:20, David Blaikie via llvm-dev wrote:
> On Mon, Mar 16, 2020 at 9:31 AM Robinson, Paul <paul.robinson at sony.com
> <mailto:paul.robinson at sony.com>> wrote:
> 
>     With AVR being affected, upstreaming a patch to put segment
>     selectors into .debug_aranges becomes completely reasonable.  There
>     would likely want to be a target hook somewhere to return a value
>     saying what size to use, with the default implementation returning zero.
> 
> 
> *nod* something along those lines
>  

Does that mean putting the selector *only* into debug_aranges (and not
debug_line, debug_frame, etc.)?

Even though they are not really needed if the target only ever has one
code address space, it seems somewhat odd to have different values for
segment_selector_size in different sections.

In the DWARF spec these are described as "... containing the size in
bytes of a segment selector on the _target system_". I would interpret
the "target system" portion of that as meaning that the segment selector
size is a property of a target, and hence, it should be consistent
across all relevant sections.

pl


More information about the llvm-dev mailing list