Skip to content

Commit

Permalink
Revert "[lldb] Improve unwinding for discontinuous functions (llvm#11…
Browse files Browse the repository at this point in the history
…1409)"

This reverts commit a89e016.

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
  • Loading branch information
rastogishubham committed Oct 14, 2024
1 parent 1c17484 commit d8de239
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 379 deletions.
4 changes: 1 addition & 3 deletions lldb/source/Commands/CommandObjectTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3583,12 +3583,10 @@ class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
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;

Expand Down
12 changes: 6 additions & 6 deletions lldb/source/Symbol/UnwindTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
256 changes: 0 additions & 256 deletions lldb/test/Shell/Unwind/Inputs/basic-block-sections-with-dwarf.s

This file was deleted.

26 changes: 0 additions & 26 deletions lldb/test/Shell/Unwind/Inputs/linux-x86_64.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions lldb/test/Shell/Unwind/basic-block-sections-with-dwarf-static.test

This file was deleted.

Loading

0 comments on commit d8de239

Please sign in to comment.