From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4202 invoked by alias); 14 Sep 2009 16:15:20 -0000 Received: (qmail 4173 invoked by uid 22791); 14 Sep 2009 16:15:17 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f180.google.com (HELO mail-px0-f180.google.com) (209.85.216.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Sep 2009 16:15:10 +0000 Received: by pxi10 with SMTP id 10so2831251pxi.24 for ; Mon, 14 Sep 2009 09:15:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.24.36 with SMTP id b36mr452035wfj.256.1252944909110; Mon, 14 Sep 2009 09:15:09 -0700 (PDT) In-Reply-To: <20090914155327.GA26740@caradoc.them.org> References: <20090914155327.GA26740@caradoc.them.org> From: Hui Zhu Date: Mon, 14 Sep 2009 16:15:00 -0000 Message-ID: Subject: Re: PRecord sets memory even when it says it did not To: Daniel Jacobowitz , Marc Khouzam , "gdb@sourceware.org" , Michael Snyder , gdb-patches ml 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-09/txt/msg00407.txt.bz2 On Mon, Sep 14, 2009 at 23:53, Daniel Jacobowitz wrote: > On Mon, Sep 14, 2009 at 12:39:35PM +0800, Hui Zhu wrote: >> > (gdb) set var a =3D 8 >> > Because GDB is in replay mode, writing to memory will make the executi= on log unusable from this point onward. =A0Write memory at address 0xbffff6= a0?(y or [n]) n >> > Process record canceled the operation. >> > (gdb) p a >> > $2 =3D 8 > > This should refetch the value from the target. =A0What value is cached? This value didn't really changed. It just be changed in cache, but not memory. If you s or rs and check "a" again, you will found that "a"'s value is right. (gdb) set var a =3D 8 Because GDB is in replay mode, writing to memory will make the execution log unusable from this point onward. Write memory at address 0xbffff500?(y or [n]) Process record canceled the operation. (gdb) p a $2 =3D 1 (gdb) set var a =3D 8 Because GDB is in replay mode, writing to memory will make the execution log unusable from this point onward. Write memory at address 0xbffff500?(y or [n]) n Process record canceled the operation. (gdb) p a $3 =3D 8 (gdb) rn 3 int b =3D 10; (gdb) p a $4 =3D 1 (gdb) n 5 a++; (gdb) p a $5 =3D 1 (gdb) n No more reverse-execution history. main () at 1.c:6 6 b++; (gdb) p a $6 =3D 2 (gdb) BTW, this is really a strange thing. If answer is enter, everything is OK. If answer is no, it was changed. > >> 2009-09-14 =A0Hui Zhu =A0 >> >> =A0 =A0 =A0 * record.c (record_xfer_partial): Call free_all_values when >> =A0 =A0 =A0 cancel the operation. > > I don't think this is a good idea; this is a memory management > function. =A0It's not supposed to change the apparent values. > Agree. Looks we have a strange thing need to be handled. Thanks, Hui