[Lldb-commits] [lldb] r231550 - Move Python Init from InitializeForLLGS to Initialize
Vince Harron
vharron at google.com
Fri Mar 6 19:37:15 PST 2015
Author: vharron
Date: Fri Mar 6 21:37:15 2015
New Revision: 231550
URL: http://llvm.org/viewvc/llvm-project?rev=231550&view=rev
Log:
Move Python Init from InitializeForLLGS to Initialize
Linux configure+make builds have ~175 tests failing that aren't
failing in cmake builds. The tests have error messages like
"'a.out' doesn't contain the architecture x86-64" ObjectFileELF
plugin wasn't loaded when this message was output.
I found ScriptInterpreterPython::InitializePrivate() is calling
Debugger::Terminate(), which terminates ObjectFileELF (and lots
of other stuff) setup earlier in the InitializeForLLGS.
So I moved python Init/Term from Init/TermForLLGS to Init/Term
Modified:
lldb/trunk/source/lldb.cpp
Modified: lldb/trunk/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=231550&r1=231549&r2=231550&view=diff
==============================================================================
--- lldb/trunk/source/lldb.cpp (original)
+++ lldb/trunk/source/lldb.cpp Fri Mar 6 21:37:15 2015
@@ -186,11 +186,6 @@ lldb_private::InitializeForLLGS ()
PlatformDarwinKernel::Initialize();
ObjectFileMachO::Initialize();
#endif
-
-#ifndef LLDB_DISABLE_PYTHON
- ScriptInterpreterPython::InitializePrivate();
- OperatingSystemPython::Initialize();
-#endif
}
}
@@ -206,6 +201,12 @@ lldb_private::Initialize ()
if (!g_inited)
{
g_inited = true;
+
+#ifndef LLDB_DISABLE_PYTHON
+ ScriptInterpreterPython::InitializePrivate();
+ OperatingSystemPython::Initialize();
+#endif
+
// Initialize LLVM and Clang
llvm::InitializeAllTargets();
llvm::InitializeAllAsmPrinters();
@@ -304,9 +305,6 @@ lldb_private::TerminateLLGS ()
PlatformDarwinKernel::Terminate();
SymbolVendorMacOSX::Terminate();
#endif
-#ifndef LLDB_DISABLE_PYTHON
- OperatingSystemPython::Terminate();
-#endif
Log::Terminate();
}
@@ -350,6 +348,11 @@ lldb_private::Terminate ()
PlatformRemoteGDBServer::Terminate();
ProcessGDBRemote::Terminate();
DynamicLoaderStatic::Terminate();
+
+#ifndef LLDB_DISABLE_PYTHON
+ OperatingSystemPython::Terminate();
+#endif
+
TerminateLLGS();
}
More information about the lldb-commits
mailing list