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]

[PATCH] Fix handling of qtsave responses


Hi,

This obvious patch fixes a wrong comparison when handling the qtsave packet response in GDB.

It has been approved off-list by Pedro.

Regards,
Luis
2011-09-28  Luis Machado  <lgustavo@codesourcery.com>

	* remote.c (remote_save_trace_data): Invert comparison.

--- .pc/qtsave_fix.diff/gdb/remote.c	2011-09-19 01:30:28.776599952 -0300
+++ gdb/remote.c	2011-09-19 01:32:05.104599949 -0300
@@ -10639,7 +10639,7 @@ remote_save_trace_data (const char *file
   *p++ = '\0';
   putpkt (rs->buf);
   reply = remote_get_noisy_reply (&target_buf, &target_buf_size);
-  if (*reply != '\0')
+  if (*reply == '\0')
     error (_("Target does not support this command."));
   if (strcmp (reply, "OK") != 0)
     error (_("Bogus reply from target: %s"), reply);

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