[Lldb-commits] [llvm] [lldb] Add support for parsing type unit entries in .debug_names. (PR #72952)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 21 11:19:44 PST 2023
================
@@ -621,7 +621,10 @@ std::optional<uint64_t> DWARFDebugNames::Entry::getCUIndex() const {
if (std::optional<DWARFFormValue> Off = lookup(dwarf::DW_IDX_compile_unit))
return Off->getAsUnsignedConstant();
// In a per-CU index, the entries without a DW_IDX_compile_unit attribute
- // implicitly refer to the single CU.
+ // implicitly refer to the single CU, but only if we don't have a
----------------
clayborg wrote:
We only return 0 if this DebugName::Entry doesn't have a `DW_IDX_type_unit` and if there is no valid CU index from a `DW_IDX_compile_unit `. The code is correct.
https://github.com/llvm/llvm-project/pull/72952
More information about the lldb-commits
mailing list