#include "common/common-utils.h"
#include "cli/cli-utils.h"
#include "disasm.h"
+#include "gdbthread.h"
#include <ctype.h>
return t;
}
+/* Check that the inferior thread is not running. Throw an error if it is. */
+
+static void
+require_not_running (void)
+{
+ if (is_running (inferior_ptid))
+ error (_("Cannot execute this command while "
+ "the selected thread is running."));
+}
+
/* See record.h. */
void
insn = parse_and_eval_long (arg);
require_record_target ();
+ require_not_running ();
target_goto_record (insn);
}
error (_("Junk after argument: %s."), arg);
require_record_target ();
+ require_not_running ();
target_goto_record_begin ();
}
error (_("Junk after argument: %s."), arg);
require_record_target ();
+ require_not_running ();
target_goto_record_end ();
}