diff options
author | Jim Ingham <jingham@apple.com> | 2016-08-05 22:06:12 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-08-05 22:06:12 +0000 |
commit | c915a7d2e810251e28758803d5e72a8178e7b917 (patch) | |
tree | 42ba335d2e8fa3cb03b8a8146c052df3406758f7 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
parent | 272cbacc25beec921298db499ec12a11ac584fcb (diff) | |
download | bcm5719-llvm-c915a7d2e810251e28758803d5e72a8178e7b917.tar.gz bcm5719-llvm-c915a7d2e810251e28758803d5e72a8178e7b917.zip |
Add a few more needed bits to the scripted thread plans.
llvm-svn: 277879
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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) { |