From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22421 invoked by alias); 6 May 2009 03:35:48 -0000 Received: (qmail 22413 invoked by uid 22791); 6 May 2009 03:35:47 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 May 2009 03:35:42 +0000 Received: by ti-out-0910.google.com with SMTP id a1so518107tib.12 for ; Tue, 05 May 2009 20:35:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.69.5 with SMTP id r5mr49089tia.22.1241580938980; Tue, 05 May 2009 20:35:38 -0700 (PDT) In-Reply-To: <833abiexcc.fsf@gnu.org> References: <83d4ane6kb.fsf@gnu.org> <833abiexcc.fsf@gnu.org> Date: Wed, 06 May 2009 03:35:00 -0000 Message-ID: Subject: Re: [Precord RFA/RFC] Check Linux sys_brk release memory in process record and replay. From: Hui Zhu To: Eli Zaretskii Cc: gdb-patches@sourceware.org, msnyder@vmware.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-05/txt/msg00101.txt.bz2 On Wed, May 6, 2009 at 11:14, Eli Zaretskii wrote: >> Date: Wed, 6 May 2009 10:13:15 +0800 >> From: Hui Zhu >> Cc: gdb-patches@sourceware.org, msnyder@vmware.com >> >> If inferior release some memory, the replay will got big error because >> prec will set memory old value to this memory. > > Yes, I understand that, but why will this cause an error? If this memory already release and gdb still write value to this address, the os mm will make this operation fail. If you think the query words is too threatening. Could you give me some help? But I still want user choice stop. :) > >> >> =A0 =A0 =A0 * gdbarch.sh (process_record_reset): This interface point= to >> >> =A0 =A0 =A0 the function that reset the architecture process record a= nd >> >> =A0 =A0 =A0 replay. >> > >> > I think "reset" is not the best name for this. =A0How about >> > "initialize"? >> >> This interface will be call each time when prec open, so it will reset >> the old value. >> I think initialize looks like just call once. =A0For example >> "_initialize_infcall". > > "reset" has the opposite problem: the first time you call it, it has > no old state to reset. > > If you don't like "initialize", perhaps "reinitialize" or "reinit" is > okay? =A0It is still better than "reset", IMO, because "reset" is very > ambiguous in the context of tracking machine instructions. =A0It took me > several minutes to understand what is that all about and why are you > introducing such an interface together with the sbrk handling. > > Or maybe "prepare" is better? > I think both reinitialize and prepare is OK for me. Do you have some idea with it? Thanks, Hui