From c915a7d2e810251e28758803d5e72a8178e7b917 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 5 Aug 2016 22:06:12 +0000 Subject: Add a few more needed bits to the scripted thread plans. llvm-svn: 277879 --- .../Python/ScriptInterpreterPython.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 78816737059..0025161988c 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1823,6 +1823,23 @@ ScriptInterpreterPython::ScriptedThreadPlanShouldStop(StructuredData::ObjectSP i return should_stop; } +bool +ScriptInterpreterPython::ScriptedThreadPlanIsStale(StructuredData::ObjectSP implementor_sp, bool &script_error) +{ + bool is_stale = true; + StructuredData::Generic *generic = nullptr; + if (implementor_sp) + generic = implementor_sp->GetAsGeneric(); + if (generic) + { + Locker py_lock(this, Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN); + is_stale = g_swig_call_thread_plan(generic->GetValue(), "is_stale", nullptr, script_error); + if (script_error) + return true; + } + return is_stale; +} + lldb::StateType ScriptInterpreterPython::ScriptedThreadPlanGetRunState(StructuredData::ObjectSP implementor_sp, bool &script_error) { -- cgit v1.2.3