+2008-10-05 Hui Zhu <teawater@gmail.com>
+
+ * infcmd.c (kill_if_already_running): If record target is used,
+ output special query.
+ * infrun.c (use_displaced_stepping): Return false if record/replay.
+ (proceed): Do not record state changes made by gdb in 'proceed'.
+
2008-10-05 Michael Snyder <msnyder@promb-2s-dhcp59.eng.vmware.com>
* reverse.c (exec_reverse_once): Call do_cleanups explicitly.
#include "exceptions.h"
#include "cli/cli-decode.h"
#include "gdbthread.h"
+#include "record.h"
/* Functions exported for general use, in inferior.h: */
restart it. */
target_require_runnable ();
- if (from_tty
- && !query ("The program being debugged has been started already.\n\
+ if (from_tty)
+ if (!query (RECORD_IS_USED ?
+ "The program being debugged has been started already,\n\
+and is running in record/replay mode. Do you want to abandon\n\
+the recording and start the program from the beginning? " :
+ "The program being debugged has been started already.\n\
Start it from the beginning? "))
- error (_("Program not restarted."));
+ error (_("Program not restarted."));
target_kill ();
}
}
#include "mi/mi-common.h"
#include "event-top.h"
+#include "record.h"
+
/* Prototypes for local functions */
static void signals_info (char *, int);
use_displaced_stepping (struct gdbarch *gdbarch)
{
return (can_use_displaced_stepping
- && gdbarch_displaced_step_copy_insn_p (gdbarch));
+ && gdbarch_displaced_step_copy_insn_p (gdbarch)
+ && !RECORD_IS_USED);
}
/* Clean out any stray displaced stepping state. */
if (step < 0)
stop_after_trap = 1;
+ /* When GDB resumes the inferior, record target doesn't need to
+ record the memory and register store operation of GDB. So set
+ record_not_record to 1. */
+ if (RECORD_IS_USED)
+ record_not_record_set ();
+
if (addr == (CORE_ADDR) -1)
{
if (pc == stop_pc && breakpoint_here_p (pc)