[Lldb-commits] [PATCH] Fix -gdb-exit to detach if was attached or destroy otherwise (MI)

Ilia K ki.stfu at gmail.com
Tue Mar 24 13:51:35 PDT 2015


================
Comment at: source/Target/Process.cpp:824-842
@@ -823,28 +823,21 @@
 {
     switch (GetPrivateState())
     {
         case eStateConnected:
         case eStateAttaching:
         case eStateLaunching:
         case eStateStopped:
         case eStateRunning:
         case eStateStepping:
         case eStateCrashed:
         case eStateSuspended:
-            if (GetShouldDetach())
-            {
-                // FIXME: This will have to be a process setting:
-                bool keep_stopped = false;
-                Detach(keep_stopped);
-            }
-            else
-                Destroy();
+            Destroy();
             break;
             
         case eStateInvalid:
         case eStateUnloaded:
         case eStateDetached:
         case eStateExited:
             break;
     }
 
----------------
clayborg wrote:
> This switch is no longer needed, just replace with:
> 
> ```Destroy();```
I thought it's a smart optimization to avoid superfluous actions when target was Unloaded/Detached/Exited. Why you wanna remove it?

http://reviews.llvm.org/D8298

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list