[PATCH] Move Python Init from InitializeForLLGS to Initialize
Vince Harron
vharron at google.com
Fri Mar 6 19:32:05 PST 2015
Hi clayborg, flackr, tberghammer,
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
http://reviews.llvm.org/D8133
Files:
source/lldb.cpp
Index: source/lldb.cpp
===================================================================
--- source/lldb.cpp
+++ source/lldb.cpp
@@ -186,11 +186,6 @@
PlatformDarwinKernel::Initialize();
ObjectFileMachO::Initialize();
#endif
-
-#ifndef LLDB_DISABLE_PYTHON
- ScriptInterpreterPython::InitializePrivate();
- OperatingSystemPython::Initialize();
-#endif
}
}
@@ -206,6 +201,12 @@
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 @@
PlatformDarwinKernel::Terminate();
SymbolVendorMacOSX::Terminate();
#endif
-#ifndef LLDB_DISABLE_PYTHON
- OperatingSystemPython::Terminate();
-#endif
Log::Terminate();
}
@@ -350,6 +348,11 @@
PlatformRemoteGDBServer::Terminate();
ProcessGDBRemote::Terminate();
DynamicLoaderStatic::Terminate();
+
+#ifndef LLDB_DISABLE_PYTHON
+ OperatingSystemPython::Terminate();
+#endif
+
TerminateLLGS();
}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8133.21414.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150307/c01797e3/attachment.bin>
More information about the llvm-commits
mailing list