[PATCH] D108480: Fix DWARFDie::getDeclFile(...) to work with DW_AT_specification.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 20 12:17:15 PDT 2021
clayborg created this revision.
clayborg added reviewers: labath, aprantl, JDevlieghere, dblaikie.
Herald added a subscriber: hiraditya.
clayborg requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
DWARFDie::getDeclFile(...) previously only supported getting the DW_AT_decl_file if the DIE itself contained the DW_AT_decl_file attribute, or if the DIE had a DW_AT_abstract_origin that pointed to another DIE that had a DW_AT_decl_file. This patch allows the function to get the right attribute value if there is a DW_AT_specification that points to another DIE. We also test that if a DW_AT_abtract_origin or DW_AT_specification points to a DIE in another CU with a DW_FORM_ref_addr, that the right line table is used to extract the file index.
Full tests were added for the following cases:
- DIE has a DW_AT_decl_file attribute
- DIE has a DW_AT_abtract_origin that points to another die in the same CU
- DIE has a DW_AT_abtract_origin that points to another die in another CU
- DIE has a DW_AT_specification that points to another die in the same CU
- DIE has a DW_AT_specification that points to another die in another CU
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108480
Files:
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108480.367866.patch
Type: text/x-patch
Size: 34165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210820/fe2eead9/attachment.bin>
More information about the llvm-commits
mailing list