aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.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/remote.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/remote.c')
-rw-r--r--gdb/remote.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 19cc0b6..b03ef59 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3146,6 +3146,8 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
struct remote_state *rs = get_remote_state ();
struct packet_config *noack_config;
char *wait_status = NULL;
+ int ret = 0;
+ volatile struct gdb_exception ex;
immediate_quit++; /* Allow user to interrupt it. */
@@ -3389,7 +3391,16 @@ remote_start_remote (int from_tty, struct target_ops *target, int extended_p)
/* Possibly the target has been engaged in a trace run started
previously; find out where things are at. */
- if (remote_get_trace_status (current_trace_status ()) != -1)
+ TRY_CATCH (ex, RETURN_MASK_ERROR)
+ {
+ ret = remote_get_trace_status (current_trace_status ());
+ }
+ if (ex.reason < 0)
+ {
+ warning (_("%s"), ex.message);
+ ret = -1;
+ }
+ if (ret != -1)
{
struct uploaded_tp *uploaded_tps = NULL;
struct uploaded_tsv *uploaded_tsvs = NULL;