[Lldb-commits] [lldb] [lldb] Support DW_AT_address_class in DWARFASTParserClang (PR #230555)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Sun Oct 18 06:03:41 PDT 2026


================
@@ -946,6 +950,25 @@ DWARFASTParserClang::ParseTypeModifier(const SymbolContext &sc,
     }
   }
 
+  // A pointer with DW_AT_address_class points into a target address space
+  // (e.g. a GPU, DSP, or accelerator memory). Record it as an address-space
+  // qualifier on the pointee so value objects can map the pointer to a process
+  // address.
+  if (!clang_type && tag == DW_TAG_pointer_type && attrs.address_class != 0 &&
+      attrs.type.IsValid()) {
----------------
Michael137 wrote:

Is the `!clang_type` check here necessary? I don't think it's set other than for those special objc-cases above. But those reset `encoding_data_type`. So I think it's sufficient to do:
```
if (encoding_data_type == Type::eEncodingIsPointerUID && attrs.address_class != llvm::dwarf::DW_ADDR_none && attrs.type.IsValid())
```
(assuming we add the `DW_ADDR_none` constant; see my other comment)

https://github.com/llvm/llvm-project/pull/230555


More information about the lldb-commits mailing list