<div dir="ltr">Currently debugserver sends two responses to the 'k' gdb-remote kill request.  The first one is automatically sent out without question when receiving the 'k' packet.  The second one comes when the process really dies (i.e. the real result, including extra info re: description).<div>
<br></div><div>This change removes the first automatic 'X09' response, and adjusts the gdb-remote 'k' test to accept the key-val info from the true X response from death of the process on MacOSX.  This change also eliminates a set of verbose warnings from the gdb-remote test suite where the second X results was picked up but was unexpected, never matched, by the test system.</div>
<div><br></div><div>llgs already behaves this way.</div><div><br></div><div><font face="courier new, monospace" size="1">Index: test/tools/lldb-gdbserver/TestLldbGdbServer.py</font></div><div><font face="courier new, monospace" size="1">===================================================================</font></div>
<div><font face="courier new, monospace" size="1">--- test/tools/lldb-gdbserver/TestLldbGdbServer.py<span class="" style="white-space:pre">   </span>(revision 212951)</font></div><div><font face="courier new, monospace" size="1">+++ test/tools/lldb-gdbserver/TestLldbGdbServer.py<span class="" style="white-space:pre">    </span>(working copy)</font></div>
<div><font face="courier new, monospace" size="1">@@ -408,10 +408,10 @@</font></div><div><font face="courier new, monospace" size="1"> </font></div><div><font face="courier new, monospace" size="1">     def attach_commandline_kill_after_initial_stop(self):</font></div>
<div><font face="courier new, monospace" size="1">         procs = self.prep_debug_monitor_and_inferior()</font></div><div><font face="courier new, monospace" size="1">-        self.test_sequence.add_log_lines(</font></div>
<div><font face="courier new, monospace" size="1">-            ["read packet: $k#6b",</font></div><div><font face="courier new, monospace" size="1">-             "send packet: $X09#00"],</font></div><div>
<font face="courier new, monospace" size="1">-            True)</font></div><div><font face="courier new, monospace" size="1">+        self.test_sequence.add_log_lines([</font></div><div><font face="courier new, monospace" size="1">+            "read packet: $k#6b",</font></div>
<div><font face="courier new, monospace" size="1">+            {"direction":"send", "regex":r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}" },</font></div><div><font face="courier new, monospace" size="1">+            ], True)</font></div>
<div><font face="courier new, monospace" size="1">         self.expect_gdbremote_sequence()</font></div><div><font face="courier new, monospace" size="1"> </font></div><div><font face="courier new, monospace" size="1">         # Wait a moment for completed and now-detached inferior process to clear.</font></div>
<div><font face="courier new, monospace" size="1">Index: tools/debugserver/source/RNBRemote.cpp</font></div><div><font face="courier new, monospace" size="1">===================================================================</font></div>
<div><font face="courier new, monospace" size="1">--- tools/debugserver/source/RNBRemote.cpp<span class="" style="white-space:pre">   </span>(revision 212951)</font></div><div><font face="courier new, monospace" size="1">+++ tools/debugserver/source/RNBRemote.cpp<span class="" style="white-space:pre">    </span>(working copy)</font></div>
<div><font face="courier new, monospace" size="1">@@ -3857,7 +3857,8 @@</font></div><div><font face="courier new, monospace" size="1">     // No response to should be sent to the kill packet</font></div><div><font face="courier new, monospace" size="1">     if (m_ctx.HasValidProcessID())</font></div>
<div><font face="courier new, monospace" size="1">         DNBProcessKill (m_ctx.ProcessID());</font></div><div><font face="courier new, monospace" size="1">-    SendPacket ("X09");</font></div><div><font face="courier new, monospace" size="1">+    // Don't send the X - wait for the real process death to do that.</font></div>
<div><font face="courier new, monospace" size="1">+    // Otherwise, we get two X stop notifications for the process death.</font></div><div><font face="courier new, monospace" size="1">     return rnb_success;</font></div>
<div><font face="courier new, monospace" size="1"> }</font></div><div><font face="courier new, monospace" size="1"> </font></div><div>-- <br></div><div><div dir="ltr">-Todd</div>
</div></div>