Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: teawater <teawater@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Resubmit process record and replay, 6/10
Date: Thu, 20 Nov 2008 04:48:00 -0000	[thread overview]
Message-ID: <4924C39B.7040101@vmware.com> (raw)
In-Reply-To: <daef60380811160022y51f62febx66fd6fd1ece2973a@mail.gmail.com>

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) 


  reply	other threads:[~2008-11-20  1:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17  2:27 teawater
2008-11-20  4:48 ` Michael Snyder [this message]
2008-11-20  5:27   ` Pedro Alves
2008-11-20  8:04     ` Michael Snyder
2008-11-20  8:08       ` Pedro Alves
2008-11-24 16:45         ` teawater
2008-11-26 17:25           ` Pedro Alves
2008-11-26 20:44             ` teawater
2008-11-24 17:32   ` teawater
2008-11-24 21:54     ` Michael Snyder
2008-11-25 17:47       ` teawater
2008-11-26 15:55         ` Michael Snyder
2008-11-26 19:32           ` teawater
2008-12-05  3:35             ` teawater
2008-12-11  3:43             ` teawater
2008-12-19  7:26 ` teawater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4924C39B.7040101@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb-patches@sourceware.org \
    --cc=teawater@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox