This is an archive of the discontinued LLVM Phabricator instance.

Move Python Init from InitializeForLLGS to Initialize
ClosedPublic

Authored by vharron on Mar 6 2015, 7:32 PM.

Details

Summary

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

Diff Detail

Event Timeline

vharron updated this revision to Diff 21414.Mar 6 2015, 7:32 PM
vharron retitled this revision from to Move Python Init from InitializeForLLGS to Initialize.
vharron updated this object.
vharron edited the test plan for this revision. (Show Details)
vharron added reviewers: clayborg, flackr, tberghammer.
vharron added a subscriber: Unknown Object (MLST).

Are you sure, that lldb-server don't use the ScriptInterpreterPython moduul?
If yes then it looks good to me, but I would suggest to add a reference counting to the [Initialize,Terminate]LLGS methods (possibly as a separate patch).

I think the behavior is different with cmake+ninja and with configure+make because one of them compiles with LLDB_DISABLE_PYTHON enabled while the other without it.

flackr edited edge metadata.Mar 8 2015, 5:53 PM

Can you verify that you're still able to launch a remote process? When I tried to remove the python initialization it failed on trying to run "process launch" to start the process on the remote llgs platform.

tberghammer accepted this revision.Mar 10 2015, 3:28 AM
tberghammer edited edge metadata.

Accepted with follow up discussion in D8183

This revision is now accepted and ready to land.Mar 10 2015, 3:28 AM
clayborg accepted this revision.Mar 10 2015, 11:39 AM
clayborg edited edge metadata.

Looks good.

vharron closed this revision.Mar 12 2015, 1:12 PM

Committed