Finished up the async attach support. This allows us to request to attach
by name or by pid (with or without waiting for a process to launch) and
catch the response asynchronously.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124530 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 20af4b4..54382ff 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -273,6 +273,17 @@
                 {
                 case 'T':
                 case 'S':
+                    if (process->GetStopID() == 0)
+                    {
+                        if (process->GetID() == LLDB_INVALID_PROCESS_ID)
+                        {
+                            lldb::pid_t pid = GetCurrentProcessID (1);
+                            if (pid != LLDB_INVALID_PROCESS_ID)
+                                process->SetID (pid);
+                        }
+                        process->BuildDynamicRegisterInfo (true);
+                    }
+
                     // Privately notify any internal threads that we have stopped
                     // in case we wanted to interrupt our process, yet we might
                     // send a packet and continue without returning control to the