Author: Jonas Devlieghere Date: 2021-07-14T13:35:53-07:00 New Revision: 1e4a417ee639b867b783e52949d22c1965ab25d0
URL: https://github.com/llvm/llvm-project/commit/1e4a417ee639b867b783e52949d22c1965ab25d0 DIFF: https://github.com/llvm/llvm-project/commit/1e4a417ee639b867b783e52949d22c1965ab25d0.diff LOG: [lldb] Always call DestroyImpl from Process::Finalize Always destroy the process, regardless of its private state. This will call the virtual function DoDestroy under the hood, giving our derived class a chance to do the necessary tear down, including what to do when the private state is eStateExited. Differential revision: https://reviews.llvm.org/D106004 Added: Modified: lldb/source/Target/Process.cpp Removed: ################################################################################ diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 99e4314428c9d..a169b4623f3ee 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -493,25 +493,9 @@ void Process::Finalize() { if (m_finalizing.exchange(true)) return; - // Destroy this process if needed - switch (GetPrivateState()) { - case eStateConnected: - case eStateAttaching: - case eStateLaunching: - case eStateStopped: - case eStateRunning: - case eStateStepping: - case eStateCrashed: - case eStateSuspended: - DestroyImpl(false); - break; - - case eStateInvalid: - case eStateUnloaded: - case eStateDetached: - case eStateExited: - break; - } + // Destroy the process. This will call the virtual function DoDestroy under + // the hood, giving our derived class a chance to do the ncessary tear down. + DestroyImpl(false); // Clear our broadcaster before we proceed with destroying Broadcaster::Clear(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits