Add a unique ID to each debugger instance.
Add functions to look up debugger by id
Add global variable to lldb python module, to hold debugger id
Modify embedded Python interpreter to update the global variable with the
id of its current debugger.
Modify the char ** typemap definition in lldb.swig to accept 'None' (for NULL)
as a valid value.
The point of all this is so that, when you drop into the embedded interpreter
from the command interpreter (or when doing Python-based breakpoint commands),
there is a way for the Python side to find/get the correct debugger
instance ( by checking debugger_unique_id, then calling
SBDebugger::FindDebuggerWithID on it).
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107287 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/lldb.swig b/scripts/lldb.swig
index 3d7d35a..4178c83 100644
--- a/scripts/lldb.swig
+++ b/scripts/lldb.swig
@@ -43,6 +43,8 @@
}
}
$1[i] = 0;
+ } else if ($input == Py_None) {
+ $1 = NULL;
} else {
PyErr_SetString(PyExc_TypeError,"not a list");
return NULL;