diff options
author | Jim Ingham <jingham@apple.com> | 2023-05-02 13:41:07 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2023-05-03 10:52:12 -0700 |
commit | c2be702104284cb3facf31124494b9a400296179 (patch) | |
tree | 9601dfe2ef698bb9baf177a4078eba79b597f33e /lldb/include | |
parent | cd05ffdbb2c303cbf476a3a48b3f67094d428e37 (diff) | |
download | llvm-c2be702104284cb3facf31124494b9a400296179.tar.gz |
Allow scripted thread plans to modify the thread stop description when
they are completed.
Diffstat (limited to 'lldb/include')
-rw-r--r-- | lldb/include/lldb/Interpreter/ScriptInterpreter.h | 8 | ||||
-rw-r--r-- | lldb/include/lldb/Target/ThreadPlanPython.h | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h index aeb822e148c7..0095905fd320 100644 --- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h @@ -314,6 +314,14 @@ public: return lldb::eStateStepping; } + virtual bool + ScriptedThreadPlanGetStopDescription(StructuredData::ObjectSP implementor_sp, + lldb_private::Stream *stream, + bool &script_error) { + script_error = true; + return false; + } + virtual StructuredData::GenericSP CreateScriptedBreakpointResolver(const char *class_name, const StructuredDataImpl &args_data, diff --git a/lldb/include/lldb/Target/ThreadPlanPython.h b/lldb/include/lldb/Target/ThreadPlanPython.h index f148f88d4c46..64854d66b8f2 100644 --- a/lldb/include/lldb/Target/ThreadPlanPython.h +++ b/lldb/include/lldb/Target/ThreadPlanPython.h @@ -51,6 +51,9 @@ public: void DidPush() override; bool IsPlanStale() override; + + bool DoWillResume(lldb::StateType resume_state, bool current_plan) override; + protected: bool DoPlanExplainsStop(Event *event_ptr) override; @@ -64,6 +67,7 @@ private: StructuredDataImpl m_args_data; std::string m_error_str; StructuredData::ObjectSP m_implementation_sp; + StreamString m_stop_description; // Cache the stop description here bool m_did_push; bool m_stop_others; |