From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9230 invoked by alias); 20 Nov 2008 01:56:20 -0000 Received: (qmail 9184 invoked by uid 22791); 20 Nov 2008 01:56:19 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Nov 2008 01:55:44 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 0EF7F13012; Wed, 19 Nov 2008 17:55:41 -0800 (PST) Received: from [10.20.92.151] (promb-2s-dhcp151.eng.vmware.com [10.20.92.151]) by mailhost4.vmware.com (Postfix) with ESMTP id 042F5C9A1C; Wed, 19 Nov 2008 17:55:41 -0800 (PST) Message-ID: <4924C39B.7040101@vmware.com> Date: Thu, 20 Nov 2008 04:48:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: teawater CC: "gdb-patches@sourceware.org" Subject: Re: [RFA] Resubmit process record and replay, 6/10 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00525.txt.bz2 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)