summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-09-26 19:47:37 +0000
committerJim Ingham <jingham@apple.com>2016-09-26 19:47:37 +0000
commitf7e07256283cc080b2720ee6587b96d92ef6f9e5 (patch)
treec9fb2ed60b237f2def721efcab79b9a749f16a35 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
parent6477ce2697bf1d9afd2bcc0cf0c16c7cf08713be (diff)
downloadbcm5719-llvm-f7e07256283cc080b2720ee6587b96d92ef6f9e5.tar.gz
bcm5719-llvm-f7e07256283cc080b2720ee6587b96d92ef6f9e5.zip
Fix serialization of Python breakpoint commands.
CommandData breakpoint commands didn't know whether they were Python or Command line commands, so they couldn't serialize & deserialize themselves properly. Fix that. I also changed the "breakpoint list" command to note in the output when the commands are Python commands. Fortunately only one test was relying on this explicit bit of text output. llvm-svn: 282432
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
index fa12bf81988..7b0e1b000d6 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
@@ -25,6 +25,7 @@
// Other libraries and framework includes
// Project includes
#include "PythonDataObjects.h"
+#include "lldb/Breakpoint/BreakpointOptions.h"
#include "lldb/Core/IOHandler.h"
#include "lldb/Host/Terminal.h"
#include "lldb/Interpreter/ScriptInterpreter.h"
@@ -37,6 +38,13 @@ namespace lldb_private {
class ScriptInterpreterPython : public ScriptInterpreter,
public IOHandlerDelegateMultiline {
public:
+ class CommandDataPython : public BreakpointOptions::CommandData {
+ public:
+ CommandDataPython() : BreakpointOptions::CommandData() {
+ interpreter = lldb::eScriptLanguagePython;
+ }
+ };
+
#if PY_MAJOR_VERSION >= 3
typedef PyObject *(*SWIGInitCallback)(void);
#else
@@ -362,6 +370,11 @@ public:
void SetBreakpointCommandCallbackFunction(BreakpointOptions *bp_options,
const char *function_name) override;
+ /// This one is for deserialization:
+ Error SetBreakpointCommandCallback(
+ BreakpointOptions *bp_options,
+ std::unique_ptr<BreakpointOptions::CommandData> &data_up) override;
+
/// Set a one-liner as the callback for the watchpoint.
void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
const char *oneliner) override;
OpenPOWER on IntegriCloud