* 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.
This commit is contained in:
Stan Shebs 2009-12-31 17:39:53 +00:00
parent a6da20b52c
commit 383e5f8553
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2009-12-31 Stan Shebs <stan@codesourcery.com>
* 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 <brobecker@adacore.com>
Internal error while loading core on alpha-tru64.

View File

@ -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 <startaddr>,<endaddr>\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 <startaddr>,<endaddr>\n");