]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2008-10-05 Hui Zhu <teawater@gmail.com>
authorMichael Snyder <msnyder@vmware.com>
Sun, 5 Oct 2008 22:20:49 +0000 (22:20 +0000)
committerMichael Snyder <msnyder@vmware.com>
Sun, 5 Oct 2008 22:20:49 +0000 (22:20 +0000)
* 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'.

gdb/ChangeLog
gdb/infcmd.c
gdb/infrun.c

index 0c0c2d206c2dc99970c52d4f45783f436d65663a..cf96a3a73ac9693851478b83564f87174a173231 100644 (file)
@@ -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.
index bd9ec758782eb2cb11d58bd989534d67166b5a1f..41262e45f5147fbc96887810f2d32836d3ec1a50 100644 (file)
@@ -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 ();
     }
 }
index 2a93bfe36c67edf1a44ebd604e44d447faa20b41..1f85212c102686f2e96cd8f36a76929cf736a6eb 100644 (file)
@@ -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)