From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17748 invoked by alias); 6 May 2009 03:14:51 -0000 Received: (qmail 17740 invoked by uid 22791); 6 May 2009 03:14:50 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 May 2009 03:14:45 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KJ700200CXOI700@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Wed, 06 May 2009 06:14:42 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.230.216]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KJ7004RWD0HE6A0@i_mtaout2.012.net.il>; Wed, 06 May 2009 06:14:42 +0300 (IDT) Date: Wed, 06 May 2009 03:14:00 -0000 From: Eli Zaretskii Subject: Re: [Precord RFA/RFC] Check Linux sys_brk release memory in process record and replay. In-reply-to: To: Hui Zhu Cc: gdb-patches@sourceware.org, msnyder@vmware.com Reply-to: Eli Zaretskii Message-id: <833abiexcc.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <83d4ane6kb.fsf@gnu.org> 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/msg00100.txt.bz2 > 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? > >>       * gdbarch.sh (process_record_reset): This interface point to > >>       the function that reset the architecture process record and > >>       replay. > > > > I think "reset" is not the best name for this.  How 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. For 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? It is still better than "reset", IMO, because "reset" is very ambiguous in the context of tracking machine instructions. It 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?