aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2011-07-06 02:43:12 +0000
committerHui Zhu <teawater@gmail.com>2011-07-06 02:43:12 +0000
commit0f3428f0833121bcfebab3cdc636c13097c88328 (patch)
treef92014e9a9b0d59dd7c8fa230ed4a0bb8e4ba6d6 /gdb/tracepoint.c
parente983944d2d93c5908e704aa59ed05cca6d52a0ea (diff)
downloadgdb-0f3428f0833121bcfebab3cdc636c13097c88328.zip
gdb-0f3428f0833121bcfebab3cdc636c13097c88328.tar.gz
gdb-0f3428f0833121bcfebab3cdc636c13097c88328.tar.bz2
2011-07-06 Hui Zhu <teawater@gmail.com>
* remote.c (remote_start_remote): Add TRY_CATCH for remote_get_trace_status. * tracepoint.c (disconnect_tracing): Ditto.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 2d62f4d..4c54d2d 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1900,11 +1900,23 @@ trace_status_mi (int on_stop)
void
disconnect_tracing (int from_tty)
{
+ int ret = 0;
+ volatile struct gdb_exception ex;
+
/* It can happen that the target that was tracing went away on its
own, and we didn't notice. Get a status update, and if the
current target doesn't even do tracing, then assume it's not
running anymore. */
- if (target_get_trace_status (current_trace_status ()) < 0)
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
+ {
+ ret = target_get_trace_status (current_trace_status ());
+ }
+ if (ex.reason < 0)
+ {
+ warning (_("%s"), ex.message);
+ ret = -1;
+ }
+ if (ret < 0)
current_trace_status ()->running = 0;
/* If running interactively, give the user the option to cancel and