[all-commits] [llvm/llvm-project] c3ec9e: [lldb][DWARF] Don't try to compute address range i...

Michael Buch via All-commits all-commits at lists.llvm.org
Fri Jun 13 06:40:49 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3ec9e3f6553b43caf2b9d754f128abbf44cf80e
      https://github.com/llvm/llvm-project/commit/c3ec9e3f6553b43caf2b9d754f128abbf44cf80e
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-06-13 (Fri, 13 Jun 2025)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list