[Lldb-commits] [lldb] [lldb][DWARFUnit] Implement PeekDIEName query (PR #78486)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 18 16:20:55 PST 2024


================
@@ -663,6 +663,30 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
   return DWARFDIE(); // Not found
 }
 
+llvm::StringRef DWARFUnit::PeekDIEName(dw_offset_t die_offset) {
+  DWARFDebugInfoEntry die;
+  if (!die.Extract(GetData(), this, &die_offset))
+    return llvm::StringRef();
+
+  // Does die contain an AT_Name?
----------------
adrian-prantl wrote:

```suggestion
  // Does die contain a DW_AT_name?
```
makes grepping more reliable

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


More information about the lldb-commits mailing list