[Lldb-commits] [lldb] r124177 - /lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Greg Clayton gclayton at apple.com
Mon Jan 24 20:57:42 PST 2011


Author: gclayton
Date: Mon Jan 24 22:57:42 2011
New Revision: 124177

URL: http://llvm.org/viewvc/llvm-project?rev=124177&view=rev
Log:
One more fix to ProcessGDBRemote::DoDestroy(). This one will make sure we
parse the exit status in case we send this packet while stopped.


Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=124177&r1=124176&r2=124177&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Jan 24 22:57:42 2011
@@ -1307,7 +1307,17 @@
     {
         StringExtractorGDBRemote response;
         bool send_async = true;
-        if (m_gdb_comm.SendPacketAndWaitForResponse("k", 1, response, 3, send_async) == 0)
+        if (m_gdb_comm.SendPacketAndWaitForResponse("k", 1, response, 3, send_async))
+        {
+            char packet_cmd = response.GetChar(0);
+
+            if (packet_cmd == 'W' || packet_cmd == 'X')
+            {
+                m_last_stop_packet = response;
+                SetExitStatus(response.GetHexU8(), NULL);
+            }
+        }
+        else
         {
             error.SetErrorString("kill packet failed");
         }





More information about the lldb-commits mailing list