| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| //===-- ThreadPlanPython.h --------------------------------------------*- C++ -*-===// | ||
| // | ||
| // The LLVM Compiler Infrastructure | ||
| // | ||
| // This file is distributed under the University of Illinois Open Source | ||
| // License. See LICENSE.TXT for details. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef liblldb_ThreadPlan_Python_h_ | ||
| #define liblldb_ThreadPlan_Python_h_ | ||
|
|
||
| // C Includes | ||
| // C++ Includes | ||
| #include <string> | ||
| // Other libraries and framework includes | ||
| // Project includes | ||
| #include "lldb/lldb-private.h" | ||
| #include "lldb/Core/UserID.h" | ||
| #include "lldb/Host/Mutex.h" | ||
| #include "lldb/Target/Process.h" | ||
| #include "lldb/Target/Target.h" | ||
| #include "lldb/Target/Thread.h" | ||
| #include "lldb/Target/ThreadPlan.h" | ||
| #include "lldb/Target/ThreadPlanTracer.h" | ||
| #include "lldb/Target/StopInfo.h" | ||
|
|
||
| namespace lldb_private { | ||
|
|
||
| //------------------------------------------------------------------ | ||
| // ThreadPlanPython: | ||
| // | ||
| //------------------------------------------------------------------ | ||
|
|
||
| class ThreadPlanPython : public ThreadPlan | ||
| { | ||
| public: | ||
| ThreadPlanPython (Thread &thread, const char *class_name); | ||
| virtual ~ThreadPlanPython (); | ||
|
|
||
| virtual void | ||
| GetDescription (Stream *s, | ||
| lldb::DescriptionLevel level); | ||
|
|
||
| virtual bool | ||
| ValidatePlan (Stream *error); | ||
|
|
||
| virtual bool | ||
| ShouldStop (Event *event_ptr); | ||
|
|
||
| virtual bool | ||
| MischiefManaged (); | ||
|
|
||
| virtual bool | ||
| WillStop (); | ||
|
|
||
| virtual bool | ||
| StopOthers (); | ||
|
|
||
| virtual void | ||
| DidPush (); | ||
|
|
||
| protected: | ||
| virtual bool | ||
| DoPlanExplainsStop (Event *event_ptr); | ||
|
|
||
| virtual lldb::StateType | ||
| GetPlanRunState (); | ||
|
|
||
| private: | ||
| std::string m_class_name; | ||
| lldb::ScriptInterpreterObjectSP m_implementation_sp; | ||
|
|
||
| DISALLOW_COPY_AND_ASSIGN(ThreadPlanPython); | ||
| }; | ||
|
|
||
|
|
||
| } // namespace lldb_private | ||
|
|
||
| #endif // liblldb_ThreadPlan_Python_h_ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| //===-- SBThread.h ----------------------------------------------*- C++ -*-===// | ||
| // | ||
| // The LLVM Compiler Infrastructure | ||
| // | ||
| // This file is distributed under the University of Illinois Open Source | ||
| // License. See LICENSE.TXT for details. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLDB_SBThreadPlan_h_ | ||
| #define LLDB_SBThreadPlan_h_ | ||
|
|
||
| #include "lldb/API/SBDefines.h" | ||
|
|
||
| #include <stdio.h> | ||
|
|
||
| namespace lldb { | ||
|
|
||
| %feature("docstring", | ||
| "Represents a plan for the execution control of a given thread. | ||
| See also SBThread and SBFrame." | ||
| ) SBThread; | ||
|
|
||
| class SBThreadPlan | ||
| { | ||
|
|
||
| friend class lldb_private::ThreadPlan; | ||
|
|
||
| public: | ||
| SBThreadPlan (); | ||
|
|
||
| SBThreadPlan (const lldb::SBThreadPlan &threadPlan); | ||
|
|
||
| SBThreadPlan (const lldb::ThreadPlanSP& lldb_object_sp); | ||
|
|
||
| SBThreadPlan (lldb::SBThread &thread, const char *class_name); | ||
|
|
||
| ~SBThreadPlan (); | ||
|
|
||
| bool | ||
| IsValid() const; | ||
|
|
||
| void | ||
| Clear (); | ||
|
|
||
| lldb::StopReason | ||
| GetStopReason(); | ||
|
|
||
| /// Get the number of words associated with the stop reason. | ||
| /// See also GetStopReasonDataAtIndex(). | ||
| size_t | ||
| GetStopReasonDataCount(); | ||
|
|
||
| //-------------------------------------------------------------------------- | ||
| /// Get information associated with a stop reason. | ||
| /// | ||
| /// Breakpoint stop reasons will have data that consists of pairs of | ||
| /// breakpoint IDs followed by the breakpoint location IDs (they always come | ||
| /// in pairs). | ||
| /// | ||
| /// Stop Reason Count Data Type | ||
| /// ======================== ===== ========================================= | ||
| /// eStopReasonNone 0 | ||
| /// eStopReasonTrace 0 | ||
| /// eStopReasonBreakpoint N duple: {breakpoint id, location id} | ||
| /// eStopReasonWatchpoint 1 watchpoint id | ||
| /// eStopReasonSignal 1 unix signal number | ||
| /// eStopReasonException N exception data | ||
| /// eStopReasonExec 0 | ||
| /// eStopReasonPlanComplete 0 | ||
| //-------------------------------------------------------------------------- | ||
| uint64_t | ||
| GetStopReasonDataAtIndex(uint32_t idx); | ||
|
|
||
| SBThread | ||
| GetThread () const; | ||
|
|
||
| bool | ||
| GetDescription (lldb::SBStream &description) const; | ||
|
|
||
| void | ||
| SetPlanComplete (bool success); | ||
|
|
||
| bool | ||
| IsPlanComplete(); | ||
|
|
||
| bool | ||
| IsValid(); | ||
|
|
||
| // This section allows an SBThreadPlan to push another of the common types of plans... | ||
| SBThreadPlan | ||
| QueueThreadPlanForStepOverRange (SBAddress &start_address, | ||
| lldb::addr_t range_size); | ||
|
|
||
| SBThreadPlan | ||
| QueueThreadPlanForStepInRange (SBAddress &start_address, | ||
| lldb::addr_t range_size); | ||
|
|
||
| SBThreadPlan | ||
| QueueThreadPlanForStepOut (uint32_t frame_idx_to_step_to, bool first_insn = false); | ||
|
|
||
| SBThreadPlan | ||
| QueueThreadPlanForRunToAddress (SBAddress address); | ||
|
|
||
|
|
||
| protected: | ||
| friend class SBBreakpoint; | ||
| friend class SBBreakpointLocation; | ||
| friend class SBFrame; | ||
| friend class SBProcess; | ||
| friend class SBDebugger; | ||
| friend class SBValue; | ||
| friend class lldb_private::QueueImpl; | ||
| friend class SBQueueItem; | ||
|
|
||
| private: | ||
| lldb::ThreadPlanSP m_opaque_sp; | ||
| }; | ||
|
|
||
| } // namespace lldb | ||
|
|
||
| #endif // LLDB_SBThreadPlan_h_ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,285 @@ | ||
| //===-- SBThread.cpp --------------------------------------------*- C++ -*-===// | ||
| // | ||
| // The LLVM Compiler Infrastructure | ||
| // | ||
| // This file is distributed under the University of Illinois Open Source | ||
| // License. See LICENSE.TXT for details. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "lldb/lldb-python.h" | ||
|
|
||
| #include "lldb/API/SBThread.h" | ||
|
|
||
| #include "lldb/API/SBSymbolContext.h" | ||
| #include "lldb/API/SBFileSpec.h" | ||
| #include "lldb/API/SBStream.h" | ||
| #include "lldb/Breakpoint/BreakpointLocation.h" | ||
| #include "lldb/Core/Debugger.h" | ||
| #include "lldb/Core/State.h" | ||
| #include "lldb/Core/Stream.h" | ||
| #include "lldb/Core/StreamFile.h" | ||
| #include "lldb/Core/StructuredData.h" | ||
| #include "lldb/Interpreter/CommandInterpreter.h" | ||
| #include "lldb/Target/SystemRuntime.h" | ||
| #include "lldb/Target/Thread.h" | ||
| #include "lldb/Target/ThreadPlan.h" | ||
| #include "lldb/Target/Process.h" | ||
| #include "lldb/Target/Queue.h" | ||
| #include "lldb/Symbol/SymbolContext.h" | ||
| #include "lldb/Symbol/CompileUnit.h" | ||
| #include "lldb/Target/StopInfo.h" | ||
| #include "lldb/Target/Target.h" | ||
| #include "lldb/Target/ThreadPlan.h" | ||
| #include "lldb/Target/ThreadPlanPython.h" | ||
| #include "lldb/Target/ThreadPlanStepInstruction.h" | ||
| #include "lldb/Target/ThreadPlanStepOut.h" | ||
| #include "lldb/Target/ThreadPlanStepRange.h" | ||
| #include "lldb/Target/ThreadPlanStepInRange.h" | ||
|
|
||
|
|
||
| #include "lldb/API/SBAddress.h" | ||
| #include "lldb/API/SBDebugger.h" | ||
| #include "lldb/API/SBEvent.h" | ||
| #include "lldb/API/SBFrame.h" | ||
| #include "lldb/API/SBProcess.h" | ||
| #include "lldb/API/SBThreadPlan.h" | ||
| #include "lldb/API/SBValue.h" | ||
|
|
||
| using namespace lldb; | ||
| using namespace lldb_private; | ||
|
|
||
| //---------------------------------------------------------------------- | ||
| // Constructors | ||
| //---------------------------------------------------------------------- | ||
| SBThreadPlan::SBThreadPlan () | ||
| { | ||
| } | ||
|
|
||
| SBThreadPlan::SBThreadPlan (const ThreadPlanSP& lldb_object_sp) : | ||
| m_opaque_sp (lldb_object_sp) | ||
| { | ||
| } | ||
|
|
||
| SBThreadPlan::SBThreadPlan (const SBThreadPlan &rhs) : | ||
| m_opaque_sp (rhs.m_opaque_sp) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| SBThreadPlan::SBThreadPlan (lldb::SBThread &sb_thread, const char *class_name) | ||
| { | ||
| Thread *thread = sb_thread.get(); | ||
| if (thread) | ||
| m_opaque_sp.reset(new ThreadPlanPython(*thread, class_name)); | ||
| } | ||
|
|
||
| //---------------------------------------------------------------------- | ||
| // Assignment operator | ||
| //---------------------------------------------------------------------- | ||
|
|
||
| const lldb::SBThreadPlan & | ||
| SBThreadPlan::operator = (const SBThreadPlan &rhs) | ||
| { | ||
| if (this != &rhs) | ||
| m_opaque_sp = rhs.m_opaque_sp; | ||
| return *this; | ||
| } | ||
| //---------------------------------------------------------------------- | ||
| // Destructor | ||
| //---------------------------------------------------------------------- | ||
| SBThreadPlan::~SBThreadPlan() | ||
| { | ||
| } | ||
|
|
||
| lldb_private::ThreadPlan * | ||
| SBThreadPlan::get() | ||
| { | ||
| return m_opaque_sp.get(); | ||
| } | ||
|
|
||
| bool | ||
| SBThreadPlan::IsValid() const | ||
| { | ||
| return m_opaque_sp.get() != NULL; | ||
| } | ||
|
|
||
| void | ||
| SBThreadPlan::Clear () | ||
| { | ||
| m_opaque_sp.reset(); | ||
| } | ||
|
|
||
| lldb::StopReason | ||
| SBThreadPlan::GetStopReason() | ||
| { | ||
| return eStopReasonNone; | ||
| } | ||
|
|
||
| size_t | ||
| SBThreadPlan::GetStopReasonDataCount() | ||
| { | ||
| return 0; | ||
| } | ||
|
|
||
| uint64_t | ||
| SBThreadPlan::GetStopReasonDataAtIndex(uint32_t idx) | ||
| { | ||
| return 0; | ||
| } | ||
|
|
||
| SBThread | ||
| SBThreadPlan::GetThread () const | ||
| { | ||
| if (m_opaque_sp) | ||
| { | ||
| return SBThread(m_opaque_sp->GetThread().shared_from_this()); | ||
| } | ||
| else | ||
| return SBThread(); | ||
| } | ||
|
|
||
| bool | ||
| SBThreadPlan::GetDescription (lldb::SBStream &description) const | ||
| { | ||
| if (m_opaque_sp) | ||
| { | ||
| m_opaque_sp->GetDescription(description.get(), eDescriptionLevelFull); | ||
| } | ||
| else | ||
| { | ||
| description.Printf("Empty SBThreadPlan"); | ||
| } | ||
| return true; | ||
| } | ||
|
|
||
| void | ||
| SBThreadPlan::SetThreadPlan (const ThreadPlanSP& lldb_object_sp) | ||
| { | ||
| m_opaque_sp = lldb_object_sp; | ||
| } | ||
|
|
||
| void | ||
| SBThreadPlan::SetPlanComplete (bool success) | ||
| { | ||
| if (m_opaque_sp) | ||
| m_opaque_sp->SetPlanComplete (success); | ||
| } | ||
|
|
||
| bool | ||
| SBThreadPlan::IsPlanComplete() | ||
| { | ||
| if (m_opaque_sp) | ||
| return m_opaque_sp->IsPlanComplete(); | ||
| else | ||
| return true; | ||
| } | ||
|
|
||
| bool | ||
| SBThreadPlan::IsValid() | ||
| { | ||
| if (m_opaque_sp) | ||
| return m_opaque_sp->ValidatePlan(nullptr); | ||
| else | ||
| return false; | ||
| } | ||
|
|
||
| // This section allows an SBThreadPlan to push another of the common types of plans... | ||
| // | ||
| // FIXME, you should only be able to queue thread plans from inside the methods of a | ||
| // Scripted Thread Plan. Need a way to enforce that. | ||
|
|
||
| SBThreadPlan | ||
| SBThreadPlan::QueueThreadPlanForStepOverRange (SBAddress &sb_start_address, | ||
| lldb::addr_t size) | ||
| { | ||
| if (m_opaque_sp) | ||
| { | ||
| Address *start_address = sb_start_address.get(); | ||
| if (!start_address) | ||
| { | ||
| return SBThreadPlan(); | ||
| } | ||
|
|
||
| AddressRange range (*start_address, size); | ||
| SymbolContext sc; | ||
| start_address->CalculateSymbolContext(&sc); | ||
| return SBThreadPlan (m_opaque_sp->GetThread().QueueThreadPlanForStepOverRange (false, | ||
| range, | ||
| sc, | ||
| eAllThreads)); | ||
| } | ||
| else | ||
| { | ||
| return SBThreadPlan(); | ||
| } | ||
| } | ||
|
|
||
| SBThreadPlan | ||
| SBThreadPlan::QueueThreadPlanForStepInRange (SBAddress &sb_start_address, | ||
| lldb::addr_t size) | ||
| { | ||
| if (m_opaque_sp) | ||
| { | ||
| Address *start_address = sb_start_address.get(); | ||
| if (!start_address) | ||
| { | ||
| return SBThreadPlan(); | ||
| } | ||
|
|
||
| AddressRange range (*start_address, size); | ||
| SymbolContext sc; | ||
| start_address->CalculateSymbolContext(&sc); | ||
| return SBThreadPlan (m_opaque_sp->GetThread().QueueThreadPlanForStepInRange (false, | ||
| range, | ||
| sc, | ||
| NULL, | ||
| eAllThreads)); | ||
| } | ||
| else | ||
| { | ||
| return SBThreadPlan(); | ||
| } | ||
| } | ||
|
|
||
| SBThreadPlan | ||
| SBThreadPlan::QueueThreadPlanForStepOut (uint32_t frame_idx_to_step_to, bool first_insn) | ||
| { | ||
| if (m_opaque_sp) | ||
| { | ||
| SymbolContext sc; | ||
| sc = m_opaque_sp->GetThread().GetStackFrameAtIndex(0)->GetSymbolContext(lldb::eSymbolContextEverything); | ||
| return SBThreadPlan (m_opaque_sp->GetThread().QueueThreadPlanForStepOut (false, | ||
| &sc, | ||
| first_insn, | ||
| false, | ||
| eVoteYes, | ||
| eVoteNoOpinion, | ||
| frame_idx_to_step_to)); | ||
| } | ||
| else | ||
| { | ||
| return SBThreadPlan(); | ||
| } | ||
| } | ||
|
|
||
| SBThreadPlan | ||
| SBThreadPlan::QueueThreadPlanForRunToAddress (SBAddress sb_address) | ||
| { | ||
| if (m_opaque_sp) | ||
| { | ||
| Address *address = sb_address.get(); | ||
| if (!address) | ||
| return SBThreadPlan(); | ||
|
|
||
| return SBThreadPlan (m_opaque_sp->GetThread().QueueThreadPlanForRunToAddress (false, | ||
| *address, | ||
| false)); | ||
| } | ||
| else | ||
| { | ||
| return SBThreadPlan(); | ||
| } | ||
| } | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,192 @@ | ||
| //===-- ThreadPlan.cpp ------------------------------------------*- C++ -*-===// | ||
| // | ||
| // The LLVM Compiler Infrastructure | ||
| // | ||
| // This file is distributed under the University of Illinois Open Source | ||
| // License. See LICENSE.TXT for details. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "lldb/lldb-python.h" | ||
|
|
||
| #include "lldb/Target/ThreadPlan.h" | ||
|
|
||
| // C Includes | ||
| // C++ Includes | ||
| // Other libraries and framework includes | ||
| // Project includes | ||
| #include "lldb/Core/Debugger.h" | ||
| #include "lldb/Core/Log.h" | ||
| #include "lldb/Core/State.h" | ||
| #include "lldb/Interpreter/CommandInterpreter.h" | ||
| #include "lldb/Interpreter/ScriptInterpreter.h" | ||
| #include "lldb/Interpreter/ScriptInterpreterPython.h" | ||
| #include "lldb/Target/RegisterContext.h" | ||
| #include "lldb/Target/Thread.h" | ||
| #include "lldb/Target/ThreadPlan.h" | ||
| #include "lldb/Target/ThreadPlanPython.h" | ||
| #include "lldb/Target/Process.h" | ||
| #include "lldb/Target/Target.h" | ||
|
|
||
| using namespace lldb; | ||
| using namespace lldb_private; | ||
|
|
||
| //---------------------------------------------------------------------- | ||
| // ThreadPlanPython | ||
| //---------------------------------------------------------------------- | ||
|
|
||
| ThreadPlanPython::ThreadPlanPython (Thread &thread, const char *class_name) : | ||
| ThreadPlan (ThreadPlan::eKindPython, | ||
| "Python based Thread Plan", | ||
| thread, | ||
| eVoteNoOpinion, | ||
| eVoteNoOpinion), | ||
| m_class_name (class_name) | ||
| { | ||
| SetIsMasterPlan (true); | ||
| SetOkayToDiscard (true); | ||
| SetPrivate (false); | ||
| } | ||
|
|
||
| ThreadPlanPython::~ThreadPlanPython () | ||
| { | ||
| // FIXME, do I need to decrement the ref count on this implementation object to make it go away? | ||
| } | ||
|
|
||
| bool | ||
| ThreadPlanPython::ValidatePlan (Stream *error) | ||
| { | ||
| // I have to postpone setting up the implementation till after the constructor because I need to call | ||
| // shared_from_this, which you can't do in the constructor. So I'll do it here. | ||
| if (m_implementation_sp) | ||
| return true; | ||
| else | ||
| return false; | ||
| } | ||
|
|
||
| void | ||
| ThreadPlanPython::DidPush() | ||
| { | ||
| // We set up the script side in DidPush, so that it can push other plans in the constructor, | ||
| // and doesn't have to care about the details of DidPush. | ||
|
|
||
| if (!m_class_name.empty()) | ||
| { | ||
| ScriptInterpreter *script_interp = m_thread.GetProcess()->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); | ||
| if (script_interp) | ||
| { | ||
| m_implementation_sp = script_interp->CreateScriptedThreadPlan (m_class_name.c_str(), this->shared_from_this()); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| bool | ||
| ThreadPlanPython::ShouldStop (Event *event_ptr) | ||
| { | ||
| Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); | ||
| if (log) | ||
| log->Printf ("%s called on Python Thread Plan: %s )", | ||
| __PRETTY_FUNCTION__, m_class_name.c_str()); | ||
|
|
||
| bool should_stop = true; | ||
| if (m_implementation_sp) | ||
| { | ||
| ScriptInterpreter *script_interp = m_thread.GetProcess()->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); | ||
| if (script_interp) | ||
| { | ||
| bool script_error; | ||
| should_stop = script_interp->ScriptedThreadPlanShouldStop (m_implementation_sp, event_ptr, script_error); | ||
| if (script_error) | ||
| SetPlanComplete(false); | ||
| } | ||
| } | ||
| return should_stop; | ||
| } | ||
|
|
||
| bool | ||
| ThreadPlanPython::DoPlanExplainsStop (Event *event_ptr) | ||
| { | ||
| Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); | ||
| if (log) | ||
| log->Printf ("%s called on Python Thread Plan: %s )", | ||
| __PRETTY_FUNCTION__, m_class_name.c_str()); | ||
|
|
||
| bool explains_stop = true; | ||
| if (m_implementation_sp) | ||
| { | ||
| ScriptInterpreter *script_interp = m_thread.GetProcess()->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); | ||
| if (script_interp) | ||
| { | ||
| bool script_error; | ||
| explains_stop = script_interp->ScriptedThreadPlanExplainsStop (m_implementation_sp, event_ptr, script_error); | ||
| if (script_error) | ||
| SetPlanComplete(false); | ||
| } | ||
| } | ||
| return explains_stop; | ||
| } | ||
|
|
||
| bool | ||
| ThreadPlanPython::MischiefManaged () | ||
| { | ||
| Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); | ||
| if (log) | ||
| log->Printf ("%s called on Python Thread Plan: %s )", | ||
| __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 SetPlanComplete in should_stop. | ||
| mischief_managed = IsPlanComplete(); | ||
| if (mischief_managed) | ||
| m_implementation_sp.reset(); | ||
| } | ||
| return mischief_managed; | ||
| } | ||
|
|
||
| lldb::StateType | ||
| ThreadPlanPython::GetPlanRunState () | ||
| { | ||
| Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); | ||
| if (log) | ||
| log->Printf ("%s called on Python Thread Plan: %s )", | ||
| __PRETTY_FUNCTION__, | ||
| m_class_name.c_str()); | ||
| lldb::StateType run_state = eStateRunning; | ||
| if (m_implementation_sp) | ||
| { | ||
| ScriptInterpreter *script_interp = m_thread.GetProcess()->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); | ||
| if (script_interp) | ||
| { | ||
| bool script_error; | ||
| run_state = script_interp->ScriptedThreadPlanGetRunState (m_implementation_sp, script_error); | ||
| } | ||
| } | ||
| return run_state; | ||
| } | ||
|
|
||
| // The ones below are not currently exported to Python. | ||
|
|
||
| bool | ||
| ThreadPlanPython::StopOthers () | ||
| { | ||
| // For now Python plans run all threads, but we should add some controls for this. | ||
| return false; | ||
| } | ||
|
|
||
| void | ||
| ThreadPlanPython::GetDescription (Stream *s, | ||
| lldb::DescriptionLevel level) | ||
| { | ||
| s->Printf ("Python thread plan implemented by class %s.", m_class_name.c_str()); | ||
| } | ||
|
|
||
| bool | ||
| ThreadPlanPython::WillStop () | ||
| { | ||
| Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD)); | ||
| if (log) | ||
| log->Printf ("%s called on Python Thread Plan: %s )", | ||
| __PRETTY_FUNCTION__, m_class_name.c_str()); | ||
| return true; | ||
| } |