From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19013 invoked by alias); 24 Nov 2008 07:09:17 -0000 Received: (qmail 18829 invoked by uid 22791); 24 Nov 2008 07:09:16 -0000 X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.184) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Nov 2008 07:08:41 +0000 Received: by ti-out-0910.google.com with SMTP id d10so1197817tib.12 for ; Sun, 23 Nov 2008 23:08:30 -0800 (PST) Received: by 10.110.2.2 with SMTP id 2mr4487833tib.11.1227510510268; Sun, 23 Nov 2008 23:08:30 -0800 (PST) Received: by 10.110.103.3 with HTTP; Sun, 23 Nov 2008 23:08:30 -0800 (PST) Message-ID: Date: Mon, 24 Nov 2008 17:32:00 -0000 From: teawater To: "Michael Snyder" Subject: Re: [RFA] Resubmit process record and replay, 6/10 Cc: "gdb-patches@sourceware.org" In-Reply-To: <4924C39B.7040101@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4924C39B.7040101@vmware.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00636.txt.bz2 Hi Michael, About "record_not_record_set", It set record_not_record to let P record doesn't record the memory and registers control behaviors of GDB in function record_store_registers and record_xfer_partial. So I think the name "record_not_record_set" and "record_skip_recording" are not very clear. Could you please give me some advices on it? Thanks, Hui On Thu, Nov 20, 2008 at 09:55, Michael Snyder wrote: > 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 >> >> * 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) > >