From e81ba283131cf76ae62fa9b601a24d080578efaa Mon Sep 17 00:00:00 2001 From: Siger Yang Date: Sun, 4 Jul 2021 19:38:12 -0300 Subject: [lldb/lua] Add scripted watchpoints for Lua Add support for Lua scripted watchpoints, with basic tests. Differential Revision: https://reviews.llvm.org/D105034 --- .../Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h index a6908d2..5eeac56 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h @@ -11,6 +11,7 @@ #include +#include "lldb/Breakpoint/WatchpointOptions.h" #include "lldb/Core/StructuredDataImpl.h" #include "lldb/Interpreter/ScriptInterpreter.h" #include "lldb/Utility/Status.h" @@ -63,6 +64,10 @@ public: lldb::user_id_t break_id, lldb::user_id_t break_loc_id); + static bool WatchpointCallbackFunction(void *baton, + StoppointCallbackContext *context, + lldb::user_id_t watch_id); + // PluginInterface protocol lldb_private::ConstString GetPluginName() override; @@ -77,9 +82,16 @@ public: std::vector> &bp_options_vec, CommandReturnObject &result) override; + void + CollectDataForWatchpointCommandCallback(WatchpointOptions *wp_options, + CommandReturnObject &result) override; + Status SetBreakpointCommandCallback(BreakpointOptions &bp_options, const char *command_body_text) override; + void SetWatchpointCommandCallback(WatchpointOptions *wp_options, + const char *command_body_text) override; + Status SetBreakpointCommandCallbackFunction( BreakpointOptions &bp_options, const char *function_name, StructuredData::ObjectSP extra_args_sp) override; @@ -91,6 +103,10 @@ private: Status RegisterBreakpointCallback(BreakpointOptions &bp_options, const char *command_body_text, StructuredData::ObjectSP extra_args_sp); + + Status RegisterWatchpointCallback(WatchpointOptions *wp_options, + const char *command_body_text, + StructuredData::ObjectSP extra_args_sp); }; } // namespace lldb_private -- cgit v1.1