From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29513 invoked by alias); 9 Mar 2009 19:31:16 -0000 Received: (qmail 29501 invoked by uid 22791); 9 Mar 2009 19:31:15 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_44,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Mar 2009 19:31:10 +0000 Received: (qmail 20663 invoked from network); 9 Mar 2009 19:31:07 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Mar 2009 19:31:07 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] Submit process record and replay third time, 3/9 Date: Mon, 09 Mar 2009 19:31:00 -0000 User-Agent: KMail/1.9.10 Cc: teawater , Marc Khouzam References: <200903032039.57204.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200903091931.07316.pedro@codesourcery.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: 2009-03/txt/msg00122.txt.bz2 On Wednesday 04 March 2009 03:41:59, teawater wrote: > >> +# For the process record and replay target. > >> +M:int:process_record:CORE_ADDR addr:addr > > > > You'll need to extend this comment a little further. =A0What is this > > callback really for? =A0E.g., what is it supposed to do? =A0These things > > should be documented here. >=20 > What about the following: > # Record a execution log of instruction at address addr. How about something more descriptive like: /* Parse the instruction at ADDR storing in the record execution log the registers and memory ranges that will be affected when the instruction executes, along with their current values. Return -1 if something goes wrong, 0 otherwise. */ > > About the interface itself, would it be possible to adjust the > > interface to make this callback's implementations not call record.c > > functions, but instead have record.c work only with the results of > > this callback? >=20 > Are you mean i386_process_record doesn't call the function in record.c? Yes. > That is so hard. A lot of this record is same for each arch. So I > encapsulation them to be some function. > For example, record_arch_list_add_reg and record_arch_list_add_mem. > Another arch will need it in the future. > So, do you think it's ok? Let's keep it as is for now. Not much use in iterating over this detail. > >> +M:void:process_record_dasm:void > >> + > > > > I'm puzzled by this one. =A0What's this for? =A0I can't see it being > > used anywhere, did I miss something? =A0What's "dasm"? =A0If its not > > used for anything yet, let's remove it for now. > > > In replay mode, gdb will call gdbarch_process_record_dasm to let arch > special code analyzes the current instruction and do some replay job. > It will make record speed up and decrease the memory use. >=20 > It just support by mips arch, but mips precord code is removed now. > So I will removed it and add it back when some arch support it. Thanks. > By the way, process_record_dasm is so ugly name. Do you have some idea w= ith it? No, sorry, because I don't know what "dasm" means. --=20 Pedro Alves