aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2018-09-13 21:35:32 +0000
committerJim Ingham <jingham@apple.com>2018-09-13 21:35:32 +0000
commit3815e702e751efb14188c0f0beeb10e343d8f053 (patch)
tree26247d7b8a0c3b3df344225d770ef7e6d553419c /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
parentd2316d756e2f3827ec662aee05d786d039b3d568 (diff)
downloadllvm-3815e702e751efb14188c0f0beeb10e343d8f053.zip
llvm-3815e702e751efb14188c0f0beeb10e343d8f053.tar.gz
llvm-3815e702e751efb14188c0f0beeb10e343d8f053.tar.bz2
Add a "scripted" breakpoint type to lldb.
This change allows you to write a new breakpoint type where the logic for setting breakpoints is determined by a Python callback written using the SB API's. Differential Revision: https://reviews.llvm.org/D51830 llvm-svn: 342185
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
index b13979d..ef29a96 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
@@ -81,6 +81,15 @@ public:
const char *method_name,
Event *event_sp, bool &got_error);
+ typedef void *(*SWIGPythonCreateScriptedBreakpointResolver)(
+ const char *python_class_name, const char *session_dictionary_name,
+ lldb_private::StructuredDataImpl *args_impl,
+ lldb::BreakpointSP &bkpt_sp);
+
+ typedef unsigned int (*SWIGPythonCallBreakpointResolver)(void *implementor,
+ const char *method_name,
+ lldb_private::SymbolContext *sym_ctx);
+
typedef void *(*SWIGPythonCreateOSPlugin)(const char *python_class_name,
const char *session_dictionary_name,
const lldb::ProcessSP &process_sp);
@@ -208,6 +217,19 @@ public:
lldb::StateType
ScriptedThreadPlanGetRunState(StructuredData::ObjectSP implementor_sp,
bool &script_error) override;
+
+ StructuredData::GenericSP
+ CreateScriptedBreakpointResolver(const char *class_name,
+ StructuredDataImpl *args_data,
+ lldb::BreakpointSP &bkpt_sp) override;
+ bool
+ ScriptedBreakpointResolverSearchCallback(StructuredData::GenericSP
+ implementor_sp,
+ SymbolContext *sym_ctx) override;
+
+ lldb::SearchDepth
+ ScriptedBreakpointResolverSearchDepth(StructuredData::GenericSP
+ implementor_sp) override;
StructuredData::GenericSP
OSPlugin_CreatePluginObject(const char *class_name,
@@ -411,7 +433,9 @@ public:
SWIGPythonScriptKeyword_Value swig_run_script_keyword_value,
SWIGPython_GetDynamicSetting swig_plugin_get,
SWIGPythonCreateScriptedThreadPlan swig_thread_plan_script,
- SWIGPythonCallThreadPlan swig_call_thread_plan);
+ SWIGPythonCallThreadPlan swig_call_thread_plan,
+ SWIGPythonCreateScriptedBreakpointResolver swig_bkpt_resolver_script,
+ SWIGPythonCallBreakpointResolver swig_call_breakpoint_resolver);
const char *GetDictionaryName() { return m_dictionary_name.c_str(); }