Call Process::Finalize directly in Debugger::Destroy, rather than having it done
authorJim Ingham <jingham@apple.com>
Wed, 27 Feb 2013 19:13:05 +0000 (19:13 +0000)
committerJim Ingham <jingham@apple.com>
Wed, 27 Feb 2013 19:13:05 +0000 (19:13 +0000)
in the Process destructor.  Doing it there can be too late depending on what the internal state
and ProcessGDBRemote Async threads are doing.

<rdar://problem/13297536>

llvm-svn: 176203

lldb/source/Core/Debugger.cpp

index dd8c613..327965c 100644 (file)
@@ -607,10 +607,7 @@ Debugger::Clear()
         {
             ProcessSP process_sp (target_sp->GetProcessSP());
             if (process_sp)
-            {
-                if (process_sp->GetShouldDetach())
-                    process_sp->Detach();
-            }
+                process_sp->Finalize();
             target_sp->Destroy();
         }
     }