aboutsummaryrefslogtreecommitdiff
path: root/lldb/source
diff options
context:
space:
mode:
authorShubham Sandeep Rastogi <srastogi22@apple.com>2024-10-14 15:25:52 -0700
committerShubham Sandeep Rastogi <srastogi22@apple.com>2024-10-14 15:27:05 -0700
commitd8de2391eb014fb3f750f4c38abc101edc1e2cc2 (patch)
treef5adb55f903b62e26ad54fe375a653a84e7752cb /lldb/source
parent1c17484e107523af2583dd62537902202ce8f2e7 (diff)
downloadllvm-d8de2391eb014fb3f750f4c38abc101edc1e2cc2.zip
llvm-d8de2391eb014fb3f750f4c38abc101edc1e2cc2.tar.gz
llvm-d8de2391eb014fb3f750f4c38abc101edc1e2cc2.tar.bz2
Revert "[lldb] Improve unwinding for discontinuous functions (#111409)"
This reverts commit a89e01634fe2e6ce0b967ead24280b6693b523dc. This is being reverted because it broke the test: Unwind/trap_frame_sym_ctx.test /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake/llvm-project/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test:21:10: error: CHECK: expected string not found in input CHECK: frame #2: {{.*}}`main
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp4
-rw-r--r--lldb/source/Symbol/UnwindTable.cpp12
2 files changed, 7 insertions, 9 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 9a4a17e..e950fb3 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -3583,12 +3583,10 @@ protected:
addr_t start_addr = range.GetBaseAddress().GetLoadAddress(target);
if (abi)
start_addr = abi->FixCodeAddress(start_addr);
- range.GetBaseAddress().SetLoadAddress(start_addr, target);
FuncUnwindersSP func_unwinders_sp(
sc.module_sp->GetUnwindTable()
- .GetUncachedFuncUnwindersContainingAddress(range.GetBaseAddress(),
- sc));
+ .GetUncachedFuncUnwindersContainingAddress(start_addr, sc));
if (!func_unwinders_sp)
continue;
diff --git a/lldb/source/Symbol/UnwindTable.cpp b/lldb/source/Symbol/UnwindTable.cpp
index 42ab7ba..da88b0c 100644
--- a/lldb/source/Symbol/UnwindTable.cpp
+++ b/lldb/source/Symbol/UnwindTable.cpp
@@ -99,6 +99,12 @@ UnwindTable::GetAddressRange(const Address &addr, const SymbolContext &sc) {
m_object_file_unwind_up->GetAddressRange(addr, range))
return range;
+ // Check the symbol context
+ if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0,
+ false, range) &&
+ range.GetBaseAddress().IsValid())
+ return range;
+
// Does the eh_frame unwind info has a function bounds for this addr?
if (m_eh_frame_up && m_eh_frame_up->GetAddressRange(addr, range))
return range;
@@ -107,12 +113,6 @@ UnwindTable::GetAddressRange(const Address &addr, const SymbolContext &sc) {
if (m_debug_frame_up && m_debug_frame_up->GetAddressRange(addr, range))
return range;
- // Check the symbol context
- if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0,
- false, range) &&
- range.GetBaseAddress().IsValid())
- return range;
-
return std::nullopt;
}