summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepOut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOut.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepOut.cpp37
1 files changed, 3 insertions, 34 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp
index 8a3bdd8146c..92403cb92ed 100644
--- a/lldb/source/Target/ThreadPlanStepOut.cpp
+++ b/lldb/source/Target/ThreadPlanStepOut.cpp
@@ -18,7 +18,6 @@
#include "lldb/Core/ValueObjectConstResult.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/Function.h"
-#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/Process.h"
@@ -45,8 +44,7 @@ ThreadPlanStepOut::ThreadPlanStepOut
Vote stop_vote,
Vote run_vote,
uint32_t frame_idx,
- LazyBool step_out_avoids_code_without_debug_info,
- bool continue_to_next_branch
+ LazyBool step_out_avoids_code_without_debug_info
) :
ThreadPlan (ThreadPlan::eKindStepOut, "Step out", thread, stop_vote, run_vote),
ThreadPlanShouldStopHere (this),
@@ -88,8 +86,7 @@ ThreadPlanStepOut::ThreadPlanStepOut
eVoteNoOpinion,
eVoteNoOpinion,
frame_idx - 1,
- eLazyBoolNo,
- continue_to_next_branch));
+ eLazyBoolNo));
static_cast<ThreadPlanStepOut *>(m_step_out_to_inline_plan_sp.get())->SetShouldStopHereCallbacks(nullptr, nullptr);
m_step_out_to_inline_plan_sp->SetPrivate(true);
}
@@ -104,35 +101,7 @@ ThreadPlanStepOut::ThreadPlanStepOut
// Find the return address and set a breakpoint there:
// FIXME - can we do this more securely if we know first_insn?
- Address return_address (return_frame_sp->GetFrameCodeAddress());
- if (continue_to_next_branch)
- {
- SymbolContext return_address_sc;
- AddressRange range;
- Address return_address_decr_pc = return_address;
- if (return_address_decr_pc.GetOffset() > 0)
- return_address_decr_pc.Slide (-1);
-
- return_address_decr_pc.CalculateSymbolContext (&return_address_sc, lldb::eSymbolContextLineEntry | lldb::eSymbolContextFunction | lldb::eSymbolContextSymbol);
- if (return_address_sc.line_entry.IsValid())
- {
- range = return_address_sc.line_entry.GetSameLineContiguousAddressRange();
- }
- else if (return_address_sc.function)
- {
- range = return_address_sc.function->GetAddressRange();
- }
- else if (return_address_sc.symbol && return_address_sc.symbol->GetByteSizeIsValid())
- {
- range.GetBaseAddress() = return_address_sc.symbol->GetAddress();
- range.SetByteSize (return_address_sc.symbol->GetByteSize());
- }
- if (range.GetByteSize() > 0)
- {
- return_address = m_thread.GetProcess()->AdvanceAddressToNextBranchInstruction (return_address, range);
- }
- }
- m_return_addr = return_address.GetLoadAddress(&m_thread.GetProcess()->GetTarget());
+ m_return_addr = return_frame_sp->GetFrameCodeAddress().GetLoadAddress(&m_thread.GetProcess()->GetTarget());
if (m_return_addr == LLDB_INVALID_ADDRESS)
return;
OpenPOWER on IntegriCloud