Fixed the issue that was causing our monitor process threads to crash, it 
turned out to be unitialized data in the ProcessLaunchInfo default constructor. 
Turning on MallocScribble in the environment helped track this down. 

When we launch and attach using the host layer, we now inform the process that
it shouldn't detach when by calling an accessor.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144882 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Platform.cpp b/source/Target/Platform.cpp
index 3b78042..dbd4e40 100644
--- a/source/Target/Platform.cpp
+++ b/source/Target/Platform.cpp
@@ -581,6 +581,14 @@
         {
             ProcessAttachInfo attach_info (launch_info);
             process_sp = Attach (attach_info, debugger, target, listener, error);
+            if (process_sp)
+            {
+                // Since we attached to the process, it will think it needs to detach
+                // if the process object just goes away without an explicit call to
+                // Process::Kill() or Process::Detach(), so let it know to kill the 
+                // process if this happens.
+                process_sp->SetShouldDetach (false);
+            }
         }
     }
     return process_sp;