[Dwarf-Discuss] modeling different address spaces

Michael Eager eager@eagercon.com
Mon Jul 20 14:18:08 GMT 2020


On 7/20/20 1:31 AM, Metzger, Markus T via Dwarf-Discuss wrote:
>>> I found DW_AT_address_class, which allows attaching an integer, which
>>> could represent the address-space.? This sounds pretty close.? I?m a bit
>>> thrown off by the example, though.

>> Which example?

> Table 2.7 "Example address class codes" on p. 48.  It uses DW_AT_address_class
> to describe addressing modes.

We've muddled two related concepts, segmented addresses and address 
classes, into one description.  As recent discussion shows, maybe we 
should clarify this section.

DW_AT_segment describes how an address is constructed from a segment and 
offset.  The segment and offset are represented independently.

DW_AT_address_class is an attribute that tells the consumer how to 
interpret an address, without specifying any specific segment or address 
space.

AFAIK, only x86 uses DW_AT_segment.  I presume that it could also be 
used for architectures with multiple address spaces, but I'm not aware 
of any that do.  If anyone knows of another architecture using this 
attribute, I'd like to hear about it.

-- 
Michael Eager



More information about the Dwarf-discuss mailing list