[PATCH] D157669: Fix spurious errors that would be emitted when DW_TAG_subprogram DIEs had mutliple ranges in DW_AT_ranges.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 18:22:58 PDT 2023


clayborg created this revision.
clayborg added reviewers: yinghuitan, kusmour, aprantl, ayermolo.
Herald added a subscriber: hiraditya.
Herald added a project: All.
clayborg requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

llvm-gsymutil would emit errors about address ranges for DW_TAG_inlined_subroutine DIEs whose address range didn't exist in the parent inline information. When a DW_TAG_subprogram DIE has more than one address range with a DW_AT_ranges attribute, we emit multiple FunctionInfo objets, one for each range of a function. When we parsed the inline information, it might have inline contribution that appear in any of the function's ranges, and if we were parsing the first range of a function, all inline entries that appeared in other valid ranges of the functions would end up emitting error messages. This patch fixes this by always passing down the full list of ranges, even if they aren't being used in the parse of the information. This eliminates reporting of errors when we shouldn't have been emitting error messages. Added a test to track this and ensure this doesn't regress.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157669

Files:
  llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
  llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157669.549217.patch
Type: text/x-patch
Size: 16489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230811/9907c42f/attachment.bin>


More information about the llvm-commits mailing list