aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-07-13 17:07:16 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-07-13 17:07:16 +0000
commit67f41397ce652a92b8160eb15de66c33b598a376 (patch)
treeca128975dceefe65b38fabf81b8d0c945a137b91 /gdb/remote.c
parent28a0b48c4849f00a1ea2fd2edbb7417574547e66 (diff)
downloadgdb-67f41397ce652a92b8160eb15de66c33b598a376.zip
gdb-67f41397ce652a92b8160eb15de66c33b598a376.tar.gz
gdb-67f41397ce652a92b8160eb15de66c33b598a376.tar.bz2
gdb/
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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 19cc0b6..f9059e6 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -10045,11 +10045,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')