]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 13 Jul 2011 17:11:48 +0000 (17:11 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 13 Jul 2011 17:11:48 +0000 (17:11 +0000)
Work around kgdb.
* remote.c (remote_get_trace_status): New variable ex.  Put
remote_get_noisy_reply into TRY_CATCH.  Call exception_fprintf for it.

gdb/ChangeLog
gdb/remote.c

index d765ba7e4a427e45de83824ed70c3616044d2b46..82dc935e5dcb650574ea2088731dfc20c640abe8 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Work around kgdb.
+       * remote.c (remote_get_trace_status): New variable ex.  Put
+       remote_get_noisy_reply into TRY_CATCH.  Call exception_fprintf for it.
+
 2011-07-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix occasional crash of CTRL-C during DWARF read in.
index 77a5614dddb14c159123ca475a401c20e8d1195c..db5becae4ad29dba5e7bcae8e23fb24a66422442 100644 (file)
@@ -9979,11 +9979,21 @@ remote_get_trace_status (struct trace_status *ts)
   char *p;
   /* FIXME we need to get register block size some other way.  */
   extern int trace_regblock_size;
+  volatile struct gdb_exception ex;
 
   trace_regblock_size = get_remote_arch_state ()->sizeof_g_packet;
 
   putpkt ("qTStatus");
-  p = remote_get_noisy_reply (&target_buf, &target_buf_size);
+
+  TRY_CATCH (ex, RETURN_MASK_ERROR)
+    {
+      p = remote_get_noisy_reply (&target_buf, &target_buf_size);
+    }
+  if (ex.reason < 0)
+    {
+      exception_fprintf (gdb_stderr, ex, "qTStatus: ");
+      return -1;
+    }
 
   /* If the remote target doesn't do tracing, flag it.  */
   if (*p == '\0')