summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2008-10-05 22:20:49 +0000
committerMichael Snyder <msnyder@specifix.com>2008-10-05 22:20:49 +0000
commit85d05ff9e0b747e379984a6d868ebd7d05304219 (patch)
tree2020461bac8fadb613f8bc1a8b91c92ed1139532
parentcb57f29727b24370cdaf01a6865d449966f16fbd (diff)
downloadgdb-85d05ff9e0b747e379984a6d868ebd7d05304219.tar.gz
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'.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/infcmd.c11
-rw-r--r--gdb/infrun.c11
3 files changed, 25 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0c0c2d206c2..cf96a3a73ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index bd9ec758782..41262e45f51 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -51,6 +51,7 @@
#include "exceptions.h"
#include "cli/cli-decode.h"
#include "gdbthread.h"
+#include "record.h"
/* Functions exported for general use, in inferior.h: */
@@ -426,10 +427,14 @@ kill_if_already_running (int from_tty)
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 ();
}
}
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 2a93bfe36c6..1f85212c102 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -50,6 +50,8 @@
#include "mi/mi-common.h"
#include "event-top.h"
+#include "record.h"
+
/* Prototypes for local functions */
static void signals_info (char *, int);
@@ -573,7 +575,8 @@ static 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. */
@@ -1191,6 +1194,12 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
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)