diff options
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOut.cpp | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 40c137c4d52..26502f2eb4b 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -1626,6 +1626,7 @@ Thread::QueueThreadPlanForStepOutNoShouldStop(bool abort_other_plans, uint32_t frame_idx, bool continue_to_next_branch) { + const bool calculate_return_value = false; // No need to calculate the return value here. ThreadPlanSP thread_plan_sp(new ThreadPlanStepOut (*this, addr_context, first_insn, @@ -1634,7 +1635,8 @@ Thread::QueueThreadPlanForStepOutNoShouldStop(bool abort_other_plans, run_vote, frame_idx, eLazyBoolNo, - continue_to_next_branch)); + continue_to_next_branch, + calculate_return_value)); ThreadPlanStepOut *new_plan = static_cast<ThreadPlanStepOut *>(thread_plan_sp.get()); new_plan->ClearShouldStopHereCallbacks(); diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp index 82b823be62e..eac4a36b0a9 100644 --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -46,7 +46,8 @@ ThreadPlanStepOut::ThreadPlanStepOut Vote run_vote, uint32_t frame_idx, LazyBool step_out_avoids_code_without_debug_info, - bool continue_to_next_branch + bool continue_to_next_branch, + bool gather_return_value ) : ThreadPlan (ThreadPlan::eKindStepOut, "Step out", thread, stop_vote, run_vote), ThreadPlanShouldStopHere (this), @@ -54,7 +55,8 @@ ThreadPlanStepOut::ThreadPlanStepOut m_return_bp_id (LLDB_INVALID_BREAK_ID), m_return_addr (LLDB_INVALID_ADDRESS), m_stop_others (stop_others), - m_immediate_step_from_function(nullptr) + m_immediate_step_from_function(nullptr), + m_calculate_return_value(gather_return_value) { SetFlagsToDefault(); SetupAvoidNoDebug(step_out_avoids_code_without_debug_info); @@ -538,6 +540,9 @@ ThreadPlanStepOut::CalculateReturnValue () if (m_return_valobj_sp) return; + if (!m_calculate_return_value) + return; + if (m_immediate_step_from_function != nullptr) { CompilerType return_compiler_type = m_immediate_step_from_function->GetCompilerType().GetFunctionReturnType(); |