diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Target/ThreadPlanPython.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Target/ThreadPlanPython.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/contrib/llvm-project/lldb/source/Target/ThreadPlanPython.cpp b/contrib/llvm-project/lldb/source/Target/ThreadPlanPython.cpp index df432a0af3da..8b30c4ea7cb1 100644 --- a/contrib/llvm-project/lldb/source/Target/ThreadPlanPython.cpp +++ b/contrib/llvm-project/lldb/source/Target/ThreadPlanPython.cpp @@ -25,11 +25,10 @@ using namespace lldb_private; // ThreadPlanPython -ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name, - StructuredDataImpl *args_data) +ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name) : ThreadPlan(ThreadPlan::eKindPython, "Python based Thread Plan", thread, eVoteNoOpinion, eVoteNoOpinion), - m_class_name(class_name), m_args_data(args_data), m_did_push(false) { + m_class_name(class_name), m_did_push(false) { SetIsMasterPlan(true); SetOkayToDiscard(true); SetPrivate(false); @@ -46,9 +45,7 @@ bool ThreadPlanPython::ValidatePlan(Stream *error) { if (!m_implementation_sp) { if (error) - error->Printf("Error constructing Python ThreadPlan: %s", - m_error_str.empty() ? "<unknown error>" - : m_error_str.c_str()); + error->Printf("Python thread plan does not have an implementation"); return false; } @@ -66,16 +63,16 @@ void ThreadPlanPython::DidPush() { .GetScriptInterpreter(); if (script_interp) { m_implementation_sp = script_interp->CreateScriptedThreadPlan( - m_class_name.c_str(), m_args_data, m_error_str, - this->shared_from_this()); + m_class_name.c_str(), this->shared_from_this()); } } } bool ThreadPlanPython::ShouldStop(Event *event_ptr) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, - m_class_name.c_str()); + if (log) + log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, + m_class_name.c_str()); bool should_stop = true; if (m_implementation_sp) { @@ -96,8 +93,9 @@ bool ThreadPlanPython::ShouldStop(Event *event_ptr) { bool ThreadPlanPython::IsPlanStale() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, - m_class_name.c_str()); + if (log) + log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, + m_class_name.c_str()); bool is_stale = true; if (m_implementation_sp) { @@ -118,8 +116,9 @@ bool ThreadPlanPython::IsPlanStale() { bool ThreadPlanPython::DoPlanExplainsStop(Event *event_ptr) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, - m_class_name.c_str()); + if (log) + log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, + m_class_name.c_str()); bool explains_stop = true; if (m_implementation_sp) { @@ -140,8 +139,9 @@ bool ThreadPlanPython::DoPlanExplainsStop(Event *event_ptr) { bool ThreadPlanPython::MischiefManaged() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, - m_class_name.c_str()); + if (log) + log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, + m_class_name.c_str()); bool mischief_managed = true; if (m_implementation_sp) { // I don't really need mischief_managed, since it's simpler to just call @@ -155,8 +155,9 @@ bool ThreadPlanPython::MischiefManaged() { lldb::StateType ThreadPlanPython::GetPlanRunState() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, - m_class_name.c_str()); + if (log) + log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, + m_class_name.c_str()); lldb::StateType run_state = eStateRunning; if (m_implementation_sp) { ScriptInterpreter *script_interp = m_thread.GetProcess() @@ -187,7 +188,8 @@ void ThreadPlanPython::GetDescription(Stream *s, lldb::DescriptionLevel level) { bool ThreadPlanPython::WillStop() { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); - LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, - m_class_name.c_str()); + if (log) + log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION, + m_class_name.c_str()); return true; } |
