diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
commit | e81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch) | |
tree | 9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Target/ThreadPlanCallFunction.cpp | |
parent | 85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff) |
Notes
Diffstat (limited to 'source/Target/ThreadPlanCallFunction.cpp')
-rw-r--r-- | source/Target/ThreadPlanCallFunction.cpp | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/source/Target/ThreadPlanCallFunction.cpp b/source/Target/ThreadPlanCallFunction.cpp index e7b3abd3c9412..01ca1267dd92b 100644 --- a/source/Target/ThreadPlanCallFunction.cpp +++ b/source/Target/ThreadPlanCallFunction.cpp @@ -7,13 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Target/ThreadPlanCallFunction.h" - // C Includes // C++ Includes // Other libraries and framework includes - // Project includes +#include "lldb/Target/ThreadPlanCallFunction.h" #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Address.h" @@ -76,7 +74,7 @@ ThreadPlanCallFunction::ConstructorSetup (Thread &thread, Module *exe_module = GetTarget().GetExecutableModulePointer(); - if (exe_module == NULL) + if (exe_module == nullptr) { m_constructor_errors.Printf ("Can't execute code without an executable module."); if (log) @@ -135,7 +133,7 @@ ThreadPlanCallFunction::ConstructorSetup (Thread &thread, ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread, const Address &function, - const ClangASTType &return_type, + const CompilerType &return_type, llvm::ArrayRef<addr_t> args, const EvaluateExpressionOptions &options) : ThreadPlan (ThreadPlan::eKindCallFunction, "Call function plan", thread, eVoteNoOpinion, eVoteNoOpinion), @@ -188,9 +186,8 @@ ThreadPlanCallFunction::ThreadPlanCallFunction(Thread &thread, m_should_clear_objc_exception_bp(false), m_should_clear_cxx_exception_bp(false), m_stop_address(LLDB_INVALID_ADDRESS), - m_return_type(ClangASTType()) + m_return_type(CompilerType()) { - } ThreadPlanCallFunction::~ThreadPlanCallFunction () @@ -263,7 +260,6 @@ ThreadPlanCallFunction::DoTakedown (bool success) ClearBreakpoints(); if (log && log->GetVerbose()) ReportRegisterState ("Restoring thread state after function call. Restored register state:"); - } else { @@ -312,7 +308,6 @@ ThreadPlanCallFunction::ValidatePlan (Stream *error) return true; } - Vote ThreadPlanCallFunction::ShouldReportStop(Event *event_ptr) { @@ -330,7 +325,7 @@ ThreadPlanCallFunction::DoPlanExplainsStop (Event *event_ptr) // If our subplan knows why we stopped, even if it's done (which would forward the question to us) // we answer yes. - if (m_subplan_sp.get() != NULL && m_subplan_sp->PlanExplainsStop(event_ptr)) + if (m_subplan_sp && m_subplan_sp->PlanExplainsStop(event_ptr)) { SetPlanComplete(); return true; @@ -360,8 +355,7 @@ ThreadPlanCallFunction::DoPlanExplainsStop (Event *event_ptr) // We control breakpoints separately from other "stop reasons." So first, // check the case where we stopped for an internal breakpoint, in that case, continue on. // If it is not an internal breakpoint, consult m_ignore_breakpoints. - - + if (stop_reason == eStopReasonBreakpoint) { ProcessSP process_sp (m_thread.CalculateProcess()); @@ -426,15 +420,7 @@ ThreadPlanCallFunction::DoPlanExplainsStop (Event *event_ptr) if (m_real_stop_info_sp && m_real_stop_info_sp->ShouldStopSynchronous(event_ptr)) { SetPlanComplete(false); - if (m_subplan_sp) - { - if (m_unwind_on_error) - return true; - else - return false; - } - else - return false; + return m_subplan_sp ? m_unwind_on_error : false; } else return true; @@ -583,19 +569,17 @@ ThreadPlanCallFunction::SetStopOthers (bool new_value) m_subplan_sp->SetStopOthers(new_value); } - bool ThreadPlanCallFunction::RestoreThreadState() { return GetThread().RestoreThreadStateFromCheckpoint(m_stored_thread_state); } - void ThreadPlanCallFunction::SetReturnValue() { ProcessSP process_sp(m_thread.GetProcess()); - const ABI *abi = process_sp ? process_sp->GetABI().get() : NULL; + const ABI *abi = process_sp ? process_sp->GetABI().get() : nullptr; if (abi && m_return_type.IsValid()) { const bool persistent = false; |