[all-commits] [llvm/llvm-project] 1f7d03: Fix spurious errors that would be emitted when DW_...

Greg Clayton via All-commits all-commits at lists.llvm.org
Thu Aug 17 14:10:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f7d034e70a6b29cf5d6b37dd120e9bbb06b6521
      https://github.com/llvm/llvm-project/commit/1f7d034e70a6b29cf5d6b37dd120e9bbb06b6521
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
    M llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp

  Log Message:
  -----------
  Fix spurious errors that would be emitted when DW_TAG_subprogram DIEs had mutliple ranges in DW_AT_ranges.

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.

Also we don't warn if we end up with empty inline information if the only top level inline function have been elided where the high and low PC values are the same which indicates that the inline function was elided.

Differential Revision: https://reviews.llvm.org/D157669




More information about the All-commits mailing list