This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patchv2 2/2] Workaround gdbserver<7.7 for setfs


There was a bug in patchv1.
gdb/ChangeLog
2016-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* remote.c (packet_ok): Add workaround for PACKET_vFile_setfs.

diff --git a/gdb/remote.c b/gdb/remote.c
index bb027cf..f80fee8 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1453,7 +1453,15 @@ packet_ok (const char *buf, struct packet_config *config)
     internal_error (__FILE__, __LINE__,
 		    _("packet_ok: attempt to use a disabled packet"));
 
-  result = packet_check_result (buf);
+  if (config == &remote_protocol_packets[PACKET_vFile_setfs]
+      && strcmp (buf, "OK") == 0)
+    {
+      /* Workaround gdbserver < 7.7 before its fix from 2013-12-11.  */
+      result = PACKET_UNKNOWN;
+    }
+  else
+    result = packet_check_result (buf);
+
   switch (result)
     {
     case PACKET_OK:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]