From: Jan Kratochvil Date: Wed, 13 Jul 2011 17:11:48 +0000 (+0000) Subject: gdb/ X-Git-Tag: gdb_7_3-2011-07-26-release~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0f9e13781774386caa15270d53f9aac041391eb;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d765ba7e4a4..82dc935e5dc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-07-13 Jan Kratochvil + + 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 Fix occasional crash of CTRL-C during DWARF read in. diff --git a/gdb/remote.c b/gdb/remote.c index 77a5614dddb..db5becae4ad 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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')