Abtracted the innards of lldb-core away from the SB interface. There was some
overlap in the SWIG integration which has now been fixed by introducing
callbacks for initializing SWIG for each language (python only right now).
There was also a breakpoint command callback that called into SWIG which has
been abtracted into a callback to avoid cross over as well.
Added a new binary: lldb-platform
This will be the start of the remote platform that will use as much of the
Host functionality to do its job so it should just work on all platforms.
It is pretty hollowed out for now, but soon it will implement a platform
using the GDB remote packets as the transport.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128053 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBCommandInterpreter.cpp b/source/API/SBCommandInterpreter.cpp
index 443545d..0f1914b 100644
--- a/source/API/SBCommandInterpreter.cpp
+++ b/source/API/SBCommandInterpreter.cpp
@@ -305,4 +305,25 @@
}
+extern "C" bool
+LLDBSwigPythonBreakpointCallbackFunction
+(
+ const char *python_function_name,
+ const char *session_dictionary_name,
+ const lldb::StackFrameSP& sb_frame,
+ const lldb::BreakpointLocationSP& sb_bp_loc
+);
+extern "C" void init_lldb(void);
+
+void
+SBCommandInterpreter::InitializeSWIG ()
+{
+ static bool g_initialized = false;
+ if (!g_initialized)
+ {
+ g_initialized = true;
+ ScriptInterpreter::InitializeInterpreter (init_lldb,
+ LLDBSwigPythonBreakpointCallbackFunction);
+ }
+}
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index f871524..57fff38 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -42,6 +42,8 @@
if (log)
log->Printf ("SBDebugger::Initialize ()");
+ SBCommandInterpreter::InitializeSWIG ();
+
Debugger::Initialize();
}