This revision was automatically updated to reflect the committed changes.
Closed by commit rGb0bdaf9ba2bf: [lldb/Python] Add lldbconfig module to make
the lldb module configurable (authored by JDevlieghere).
Herald added a project: LLDB.
Changed prior to commit:
https://reviews.llvm.org/D77661?vs=255792&id=256140#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77661/new/
https://reviews.llvm.org/D77661
Files:
lldb/bindings/python.swig
lldb/packages/Python/lldbconfig/__init__.py
lldb/packages/Python/lldbsuite/test/dotest.py
Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -954,7 +954,9 @@
setupSysPath()
+ import lldbconfig
import lldb
+
# Use host platform by default.
lldb.selected_platform = lldb.SBPlatform.GetHostPlatform()
Index: lldb/packages/Python/lldbconfig/__init__.py
===================================================================
--- /dev/null
+++ lldb/packages/Python/lldbconfig/__init__.py
@@ -0,0 +1 @@
+INITIALIZE = True
Index: lldb/bindings/python.swig
===================================================================
--- lldb/bindings/python.swig
+++ lldb/bindings/python.swig
@@ -128,8 +128,15 @@
%include "./python/python-wrapper.swig"
%pythoncode%{
+_initialize = True
+try:
+ import lldbconfig
+ _initialize = lldbconfig.INITIALIZE
+except ImportError:
+ pass
debugger_unique_id = 0
-SBDebugger.Initialize()
+if _initialize:
+ SBDebugger.Initialize()
debugger = None
target = None
process = None
Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -954,7 +954,9 @@
setupSysPath()
+ import lldbconfig
import lldb
+
# Use host platform by default.
lldb.selected_platform = lldb.SBPlatform.GetHostPlatform()
Index: lldb/packages/Python/lldbconfig/__init__.py
===================================================================
--- /dev/null
+++ lldb/packages/Python/lldbconfig/__init__.py
@@ -0,0 +1 @@
+INITIALIZE = True
Index: lldb/bindings/python.swig
===================================================================
--- lldb/bindings/python.swig
+++ lldb/bindings/python.swig
@@ -128,8 +128,15 @@
%include "./python/python-wrapper.swig"
%pythoncode%{
+_initialize = True
+try:
+ import lldbconfig
+ _initialize = lldbconfig.INITIALIZE
+except ImportError:
+ pass
debugger_unique_id = 0
-SBDebugger.Initialize()
+if _initialize:
+ SBDebugger.Initialize()
debugger = None
target = None
process = None
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits