From 383e5f855398acb5ff53f32cde88bdfa675d7931 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Thu, 31 Dec 2009 17:39:53 +0000 Subject: [PATCH] * tracepoint.c (trace_find_command): Error out if trace running. (trace_find_pc_command): Ditto. (trace_find_tracepoint_command): Ditto. (trace_find_line_command): Ditto. (trace_find_range_command): Ditto. (trace_find_outside_command): Ditto. --- gdb/ChangeLog | 9 +++++++++ gdb/tracepoint.c | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0fce7b9..4f538ac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2009-12-31 Stan Shebs + + * tracepoint.c (trace_find_command): Error out if trace running. + (trace_find_pc_command): Ditto. + (trace_find_tracepoint_command): Ditto. + (trace_find_line_command): Ditto. + (trace_find_range_command): Ditto. + (trace_find_outside_command): Ditto. + 2009-12-31 Joel Brobecker Internal error while loading core on alpha-tru64. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 201c859..26a836d 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -1875,6 +1875,9 @@ trace_find_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (deprecated_trace_find_hook) deprecated_trace_find_hook (args, from_tty); @@ -1937,6 +1940,9 @@ trace_find_pc_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) pc = regcache_read_pc (get_current_regcache ()); else @@ -1958,6 +1964,9 @@ trace_find_tracepoint_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { if (tracepoint_number == -1) @@ -1994,6 +2003,9 @@ trace_find_line_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { sal = find_pc_line (get_frame_pc (get_current_frame ()), 0); @@ -2089,6 +2101,9 @@ trace_find_range_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ printf_filtered ("Usage: tfind range ,\n"); @@ -2128,6 +2143,9 @@ trace_find_outside_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ printf_filtered ("Usage: tfind outside ,\n"); -- 2.7.4