From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28010 invoked by alias); 14 Sep 2009 01:55:28 -0000 Received: (qmail 28000 invoked by uid 22791); 14 Sep 2009 01:55:27 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_12,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Sep 2009 01:55:23 +0000 Received: from eusrcmw750.eamcs.ericsson.se (eusrcmw750.exu.ericsson.se [138.85.77.50]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id n8E1tL9G008535 for ; Sun, 13 Sep 2009 20:55:21 -0500 Received: from eusrcmw751.eamcs.ericsson.se ([138.85.77.51]) by eusrcmw750.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Sun, 13 Sep 2009 20:54:59 -0500 Received: from eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.3959); Sun, 13 Sep 2009 20:54:59 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.20]) by eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) with mapi; Sun, 13 Sep 2009 21:54:59 -0400 From: Marc Khouzam To: "gdb@sourceware.org" Date: Mon, 14 Sep 2009 01:55:00 -0000 Subject: PRecord sets memory even when it says it did not Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00171.txt.bz2 Hi Hui, I'm seeing PRecord changing memory even though I answer the query as to not change it. Please see below. Thanks Marc GNU gdb (GDB) 6.8.50.20090913-cvs Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/marc/testing/a.out...done. (gdb) l 1 int main() { 2 int a =3D 1; 3 int b =3D 10; 4=09 5 a++; 6 b++; 7=09 8 return a; 9 } 10=09 (gdb) start Temporary breakpoint 1 at 0x80483f5: file b.cc, line 2. Starting program: /home/marc/testing/a.out=20 re Temporary breakpoint 1, main () at b.cc:2 2 int a =3D 1; (gdb) record (gdb) n 3 int b =3D 10; (gdb) n 5 a++; (gdb) n 6 b++; (gdb) rn 5 a++; (gdb) p a $1 =3D 1 (gdb) set var a =3D 8 Because GDB is in replay mode, writing to memory will make the execution lo= g unusable from this point onward. Write memory at address 0xbffff6a0?(y o= r [n]) n Process record canceled the operation. (gdb) p a $2 =3D 8