2010-03-17 Stan Shebs <stan@codesourcery.com>
+ * infcall.c: Include tracepoint.h.
+ (call_function_by_hand): Disallow calls in tfind mode.
+ * infcmd.c: Include tracepoint.h.
+ (ensure_not_tfind_mode): New function.
+ (continue_1): Call it.
+ (step_1) Ditto.
+ (jump_command): Ditto.
+ (signal_command): Ditto.
+ (advance_command): Ditto.
+ (until_command): Ditto.
+ (finish_command): Ditto.
+ * tracepoint.h (disconnect_or_stop_tracing): Declare.
+
* ax-gdb.h (struct axs_value): New field optimized_out.
(gen_trace_for_var): Add gdbarch argument.
* ax-gdb.c (gen_trace_static_fields): New function.
#include "defs.h"
#include "breakpoint.h"
+#include "tracepoint.h"
#include "target.h"
#include "regcache.h"
#include "inferior.h"
if (!target_has_execution)
noprocess ();
+ if (get_traceframe_number () >= 0)
+ error (_("May not call functions while looking at trace frames."));
+
frame = get_current_frame ();
gdbarch = get_frame_arch (frame);
#include "gdbthread.h"
#include "valprint.h"
#include "inline-frame.h"
-
-extern void disconnect_or_stop_tracing (int from_tty);
+#include "tracepoint.h"
/* Functions exported for general use, in inferior.h: */
Cannot execute this command without a live selected thread."));
}
+/* If the user is looking at trace frames, any resumption of execution
+ is likely to mix up recorded and live target data. So simply
+ disallow those commands. */
+
+void
+ensure_not_tfind_mode (void)
+{
+ if (get_traceframe_number () >= 0)
+ error (_("\
+Cannot execute this command while looking at trace frames."));
+}
+
void
continue_1 (int all_threads)
{
ERROR_NO_INFERIOR;
+ ensure_not_tfind_mode ();
if (non_stop && all_threads)
{
int thread = -1;
ERROR_NO_INFERIOR;
+ ensure_not_tfind_mode ();
ensure_valid_thread ();
ensure_not_running ();
int async_exec = 0;
ERROR_NO_INFERIOR;
+ ensure_not_tfind_mode ();
ensure_valid_thread ();
ensure_not_running ();
dont_repeat (); /* Too dangerous. */
ERROR_NO_INFERIOR;
+ ensure_not_tfind_mode ();
ensure_valid_thread ();
ensure_not_running ();
if (!target_has_execution)
error (_("The program is not running."));
+ ensure_not_tfind_mode ();
+
/* Find out whether we must run in the background. */
if (arg != NULL)
async_exec = strip_bg_char (&arg);
if (!target_has_execution)
error (_("The program is not running."));
+ ensure_not_tfind_mode ();
+
if (arg == NULL)
error_no_arg (_("a location"));
int async_exec = 0;
+ ensure_not_tfind_mode ();
+
/* Find out whether we must run in the background. */
if (arg != NULL)
async_exec = strip_bg_char (&arg);