aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorMichael Buch <michaelbuch12@gmail.com>2025-06-13 14:40:27 +0100
committerGitHub <noreply@github.com>2025-06-13 14:40:27 +0100
commitc3ec9e3f6553b43caf2b9d754f128abbf44cf80e (patch)
tree942702a264b7b2fccaa8df1e6e304e0c6c8d6a0d /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parentea73fc5f079d1849ca3bed902e598191105a95dc (diff)
downloadllvm-c3ec9e3f6553b43caf2b9d754f128abbf44cf80e.zip
llvm-c3ec9e3f6553b43caf2b9d754f128abbf44cf80e.tar.gz
llvm-c3ec9e3f6553b43caf2b9d754f128abbf44cf80e.tar.bz2
[lldb][DWARF] Don't try to compute address range information of forward declarations (#144059)
This fixes the error reported in https://github.com/llvm/llvm-project/pull/144037. When computing the aranges table of a CU, LLDB would currently visit all `DW_TAG_subprogram` DIEs and check their `DW_AT_low_pc`/`DW_AT_high_pc`/`DW_AT_ranges` attributes. If those don't exist it would error out and spam the console. Some subprograms (particularly forward declarations) don't have low/high pc attributes, so it's not really an "error". See DWARFv5 spec section `3.3.3 Subroutine and Entry Point Locations`: ``` A subroutine entry may have either a DW_AT_low_pc and DW_AT_high_pc pair of attributes or a DW_AT_ranges attribute whose values encode the contiguous or non-contiguous address ranges, respectively, of the machine instructions generated for the subroutine (see Section 2.17 on page 51). ... A subroutine entry representing a subroutine declaration that is not also a definition does not have code address or range attributes. ``` We should just ignore those DIEs.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions