[PATCH] D69393: [RFC][DebugInfo] emit user specified address_space in dwarf

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 24 18:31:44 PDT 2019


probinson added a comment.

The DW_AT_address_class attribute is intended to be used for target architectures where a simple address value is ambiguous, and the debugger needs additional information to resolve the ambiguity.  The canonical example is something like i386 with its segmented addresses, and an address value has different interpretations depending on whether it is (for example) a "near" or "far" pointer.
This would be in contrast to something like the VAX, where the upper two bits of the address identify a subdivision of the flat address space (VAX calls these P0, P1 <https://reviews.llvm.org/P1>, S0, where P0/P1 <https://reviews.llvm.org/P1> are Process [user] spaces and S0 is system/kernel space); however, there is no ambiguity because addresses are always 32-bit and the same address value can't be interpreted different ways.

The address spaces envisioned by the Linux kernel appear to be more informational and not descriptive of hardware characteristics.  Therefore, I would be inclined to say it's not appropriate to propagate them into DW_AT_address_class.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69393/new/

https://reviews.llvm.org/D69393





More information about the cfe-commits mailing list