diff options
| author | Pavel Labath <pavel@labath.sk> | 2025-01-10 09:56:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-10 09:56:55 +0100 |
| commit | 66a88f62cd56e55b5fa0ddb1bdffa549f7565f8f (patch) | |
| tree | f07d562d784078c07e1f676438610800609664f6 /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | |
| parent | 86b1b0671cafd462c0aa681e2d320ce597300f69 (diff) | |
[lldb] Add Function::GetAddress and redirect some uses (#115836)
Many calls to Function::GetAddressRange() were not interested in the
range itself. Instead they wanted to find the address of the function
(its entry point) or the base address for relocation of function-scoped
entities (technically, the two don't need to be the same, but there's
isn't good reason for them not to be). This PR creates a separate
function for retrieving this, and changes the existing
(non-controversial) uses to call that instead.
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index cbe077bfbaef..0ecf47a3c786 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -1061,8 +1061,7 @@ static void RemoveFunctionsWithModuleNotEqualTo(const ModuleSP &module_sp, SymbolContext sc; sc_list.GetContextAtIndex(i, sc); if (sc.function) { - const SectionSP section_sp( - sc.function->GetAddressRange().GetBaseAddress().GetSection()); + const SectionSP section_sp = sc.function->GetAddress().GetSection(); if (section_sp->GetModule() != module_sp) { sc_list.RemoveContextAtIndex(i); continue; |
