[RFA] Resubmit process record and replay, 6/10
Michael Snyder
msnyder@vmware.com
Thu Nov 20 04:48:00 GMT 2008
teawater wrote:
> This patch to add some process record and replay to infrun.c.
>
> Code for function "use_displaced_stepping" is make sure that displaced
> stepping function will disable when process record and replay target
> is opened. Because process record and replay target doesn't support
> displaced stepping function.
>
> Code for function "proceed" is call function "record_not_record_set"
> to set process record and replay target doesn't record the execute
> log. Because when GDB resume the inferior, process record and replay
> target doesn't need to record the memory and register store operation
> of GDB.
Hui, a couple of suggestions:
1) Instead of "RECORD_IS_USED", how about "TARGET_IS_PROCESS_RECORD"?
2) Instead of "record_not_record_set", how about "record_skip_recording"?
Except for the names, I think this portion of the patch
is nicely self-contained.
>
> 2008-11-16 Hui Zhu <teawater@gmail.com>
>
> * infrun.c (use_displaced_stepping): Return false if process
> record and replay target is used.
> (proceed): Call function "record_not_record_set" if pocess
> record and replay target is used.
>
> infrun.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
>
> ------------------------------------------------------------------------
>
> --- a/infrun.c
> +++ b/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);
> @@ -602,7 +604,8 @@ use_displaced_stepping (struct gdbarch *
> return (((can_use_displaced_stepping == can_use_displaced_stepping_auto
> && non_stop)
> || can_use_displaced_stepping == can_use_displaced_stepping_on)
> - && gdbarch_displaced_step_copy_insn_p (gdbarch));
> + && gdbarch_displaced_step_copy_insn_p (gdbarch)
> + && !RECORD_IS_USED);
> }
>
> /* Clean out any stray displaced stepping state. */
> @@ -1270,6 +1273,12 @@ proceed (CORE_ADDR addr, enum target_sig
> if (step < 0)
> stop_after_trap = 1;
>
> + /* When GDB resume the inferior, process 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)
More information about the Gdb-patches
mailing list