Skip to content
Commit f69f9234 authored by Pavel Labath's avatar Pavel Labath
Browse files

[lldb/DWARF] Fix DW_AT_addr_base & DW_AT_low_pc interaction

In DWARF5 DW_AT_low_pc (and DW_AT_entry_pc, and possibly others) can use
DW_FORM_addrx to refer to the address indirectly. This means we need to
have processed the DW_AT_addr_base attribute before we can do anything
with these.

Since we were processing the unit attributes serially, this created a
problem in cases where the DW_AT_addr_base comes after DW_AT_low_pc --
we would end up computing the wrong unit base address, which also
corrupted any values which later depended on that (for instance range
lists). Clang currently always emits DW_AT_addr_base last.

The fix is simple -- process DW_AT_addr_base first, regardless of its
position in the attribute list.
parent b6e2cf32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment