[Lldb-commits] [lldb] [lldb] Recurse through DW_AT_signature when looking for attributes (PR #107241)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 5 03:57:30 PDT 2024
================
@@ -60,44 +60,45 @@ class DWARFDebugInfoEntry {
return attrs;
}
- dw_offset_t
- GetAttributeValue(const DWARFUnit *cu, const dw_attr_t attr,
- DWARFFormValue &formValue,
- dw_offset_t *end_attr_offset_ptr = nullptr,
- bool check_specification_or_abstract_origin = false) const;
+ dw_offset_t GetAttributeValue(const DWARFUnit *cu, const dw_attr_t attr,
+ DWARFFormValue &formValue,
+ dw_offset_t *end_attr_offset_ptr = nullptr,
+ bool check_elaborating_dies = false) const;
- const char *GetAttributeValueAsString(
- const DWARFUnit *cu, const dw_attr_t attr, const char *fail_value,
- bool check_specification_or_abstract_origin = false) const;
+ const char *
+ GetAttributeValueAsString(const DWARFUnit *cu, const dw_attr_t attr,
+ const char *fail_value,
+ bool check_elaborating_dies = false) const;
- uint64_t GetAttributeValueAsUnsigned(
- const DWARFUnit *cu, const dw_attr_t attr, uint64_t fail_value,
- bool check_specification_or_abstract_origin = false) const;
+ uint64_t
+ GetAttributeValueAsUnsigned(const DWARFUnit *cu, const dw_attr_t attr,
+ uint64_t fail_value,
+ bool check_elaborating_dies = false) const;
----------------
labath wrote:
Most of the time, I'd say. DW_AT_specification says "this DIE is an out of line definition of the function declared in <ref>". It normally does not list the name of the function because the name is already given on the other die, but it'd perfectly reasonable for `GetName()` on the first die to return the value from the other die. The same holds for most of the other attributes (with DW_AT_declaration and DW_AT_sibling being the most notable exceptions). I think this situation is similar enough to how DW_AT_signature works for types for it to get the same treatment.
https://github.com/llvm/llvm-project/pull/107241
More information about the lldb-commits
mailing list