This is an archive of the discontinued LLVM Phabricator instance.

Add Initialize/Terminate method to Platform base plugin
ClosedPublic

Authored by tberghammer on Feb 12 2015, 7:30 AM.

Details

Summary

Add Initialize/Terminate method to Platform base plugin

The platform base plugin holds a smart pointer to each platform object created in a static variable what cause the platform destructors called only on program exit when other static variables are already destructed. With this change the destructors are called by lldb_private::Terminate() before the exit of the program.

+ Fix DebuggerRefCount handling in ScriptInterpreterPython

The issue pop out during the investigation of a resource leak (port forwards) in platform android caused by the fact that a static variable in Socket.cpp is destructed earlier then an instance of PlatformAndroid.

Diff Detail

Repository
rL LLVM

Event Timeline

tberghammer retitled this revision from to Add Initialize/Terminate method to Platform base plugin.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added reviewers: vharron, clayborg.
tberghammer added a subscriber: Unknown Object (MLST).
clayborg accepted this revision.Feb 12 2015, 9:49 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Feb 12 2015, 9:49 AM
This revision was automatically updated to reflect the committed changes.