JDevlieghere created this revision.
JDevlieghere added a reviewer: jingham.
JDevlieghere requested review of this revision.
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`.
https://reviews.llvm.org/D106004
Files:
lldb/source/Target/Process.cpp
Index: lldb/source/Target/Process.cpp
===================================================================
--- lldb/source/Target/Process.cpp
+++ lldb/source/Target/Process.cpp
@@ -493,25 +493,9 @@
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();
Index: lldb/source/Target/Process.cpp
===================================================================
--- lldb/source/Target/Process.cpp
+++ lldb/source/Target/Process.cpp
@@ -493,25 +493,9 @@
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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits