This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Fix handling of qtsave responses
- From: Luis Machado <luis_gustavo at mentor dot com>
- To: gdb-patches at sourceware dot org, Pedro Alves <pedro at codesourcery dot com>
- Date: Wed, 28 Sep 2011 03:31:24 -0300
- Subject: [PATCH] Fix handling of qtsave responses
- Reply-to: luis_gustavo at mentor dot com
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);