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

Greg Clayton clayborg at gmail.com
Tue Mar 24 09:44:02 PDT 2015


Remove the switch statement as mentioned in inline comments and we are good to go.


================
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;
     }
 
----------------
This switch is no longer needed, just replace with:

```Destroy();```

http://reviews.llvm.org/D8298

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






More information about the lldb-commits mailing list