summaryrefslogtreecommitdiffstats
path: root/include/lldb/Interpreter/ScriptInterpreterPython.h
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-11-25 21:00:58 +0000
committeremaste <emaste@FreeBSD.org>2014-11-25 21:00:58 +0000
commit01ee1789d6aa7294e5966a97f8d29387f6f81699 (patch)
treec94307da318be46e5aeea1a325c1e91749506e4f /include/lldb/Interpreter/ScriptInterpreterPython.h
parent788502c6f6261e2d84ef85d1052b41a6c5be31b3 (diff)
downloadFreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.zip
FreeBSD-src-01ee1789d6aa7294e5966a97f8d29387f6f81699.tar.gz
Import LLDB as of upstream SVN r216948 (git 50f7fe44)
This corresponds with the branchpoint for the 3.5 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL
Diffstat (limited to 'include/lldb/Interpreter/ScriptInterpreterPython.h')
-rw-r--r--include/lldb/Interpreter/ScriptInterpreterPython.h41
1 files changed, 32 insertions, 9 deletions
diff --git a/include/lldb/Interpreter/ScriptInterpreterPython.h b/include/lldb/Interpreter/ScriptInterpreterPython.h
index ba53280..14a62d6 100644
--- a/include/lldb/Interpreter/ScriptInterpreterPython.h
+++ b/include/lldb/Interpreter/ScriptInterpreterPython.h
@@ -24,6 +24,8 @@
#include "lldb/Interpreter/PythonDataObjects.h"
#include "lldb/Host/Terminal.h"
+class IOHandlerPythonInterpreter;
+
namespace lldb_private {
class ScriptInterpreterPython :
@@ -56,7 +58,7 @@ public:
ExecuteMultipleLines (const char *in_string,
const ExecuteScriptOptions &options = ExecuteScriptOptions());
- bool
+ Error
ExportFunctionDefinitionToInterpreter (StringList &function_def);
bool
@@ -130,10 +132,10 @@ public:
lldb_private::CommandReturnObject& cmd_retobj,
Error& error);
- bool
+ Error
GenerateFunction(const char *signature, const StringList &input);
- bool
+ Error
GenerateBreakpointCommandCallbackData (StringList &input, std::string& output);
bool
@@ -170,6 +172,9 @@ public:
lldb::ScriptInterpreterObjectSP& callee_wrapper_sp,
std::string& retval);
+ virtual void
+ Clear ();
+
virtual bool
GetDocumentationForItem (const char* item, std::string& dest);
@@ -220,17 +225,21 @@ public:
AcquireInterpreterLock ();
void
- CollectDataForBreakpointCommandCallback (BreakpointOptions *bp_options,
+ CollectDataForBreakpointCommandCallback (std::vector<BreakpointOptions *> &bp_options_vec,
CommandReturnObject &result);
void
CollectDataForWatchpointCommandCallback (WatchpointOptions *wp_options,
CommandReturnObject &result);
- /// Set a Python one-liner as the callback for the breakpoint.
- void
+ /// Set the callback body text into the callback for the breakpoint.
+ Error
SetBreakpointCommandCallback (BreakpointOptions *bp_options,
- const char *oneliner);
+ const char *callback_body);
+
+ void
+ SetBreakpointCommandCallbackFunction (BreakpointOptions *bp_options,
+ const char *function_name);
/// Set a one-liner as the callback for the watchpoint.
void
@@ -275,6 +284,19 @@ public:
}
+ PyThreadState *
+ GetThreadState()
+ {
+ return m_command_thread_state;
+ }
+
+ void
+ SetThreadState (PyThreadState *s)
+ {
+ if (s)
+ m_command_thread_state = s;
+ }
+
//----------------------------------------------------------------------
// IOHandlerDelegate
//----------------------------------------------------------------------
@@ -335,7 +357,8 @@ protected:
virtual
~ScriptInterpreterPythonObject()
{
- Py_XDECREF(m_object);
+ if (Py_IsInitialized())
+ Py_XDECREF(m_object);
m_object = NULL;
}
private:
@@ -392,7 +415,7 @@ public:
// FILE* m_tmp_fh;
PyGILState_STATE m_GILState;
};
-private:
+protected:
enum ActiveIOHandler {
eIOHandlerNone,
OpenPOWER on IntegriCloud