From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19010 invoked by alias); 5 Nov 2009 01:41:40 -0000 Received: (qmail 19002 invoked by uid 22791); 5 Nov 2009 01:41:40 -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-pz0-f192.google.com (HELO mail-pz0-f192.google.com) (209.85.222.192) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Nov 2009 01:41:35 +0000 Received: by pzk30 with SMTP id 30so5429220pzk.24 for ; Wed, 04 Nov 2009 17:41:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.67.29 with SMTP id p29mr245852wfa.89.1257385287118; Wed, 04 Nov 2009 17:41:27 -0800 (PST) In-Reply-To: <4AF1BF11.9030400@vmware.com> References: <4AECE12F.3000704@vmware.com> <4AF1BF11.9030400@vmware.com> From: Hui Zhu Date: Thu, 05 Nov 2009 01:41:00 -0000 Message-ID: Subject: Re: [RFA] Fix hw watchpoints in process record. To: Michael Snyder Cc: "gdb-patches@sourceware.org" Content-Type: multipart/mixed; boundary=001636e0a4ab626ecc047795d3c9 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-11/txt/msg00086.txt.bz2 --001636e0a4ab626ecc047795d3c9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 1596 On Thu, Nov 5, 2009 at 01:51, Michael Snyder wrote: > Hui Zhu wrote: >> >> Hi Michael, >> >> I do some test with this patch. =A0But sometime hb didn't work in replay >> mode. >> For example: >> Temporary breakpoint 1, main () at 1.c:20 >> 20 =A0 =A0 =A0 =A0 =A0 =A0 int =A0 =A0 b =3D 0; >> (gdb) record >> (gdb) n >> During symbol reading, incomplete CFI data; unspecified registers >> (e.g., eax) at 0x80483be. >> 21 =A0 =A0 =A0 =A0 =A0 =A0 int =A0 =A0 c =3D 1; >> (gdb) hb >> Hardware assisted breakpoint 2 at 0x80483c8: file 1.c, line 21. >> (gdb) c >> Continuing. >> a =3D 0 b =3D 0 c =3D 1 >> a =3D 3 >> a =3D 3 b =3D 3 c =3D 1 >> a =3D 3 b =3D 3 c =3D 2 >> a =3D 1 b =3D 3 c =3D 2 >> The next instruction is syscall exit_group. =A0It will make the program >> exit. =A0Do you want to stop the program?([y] or n) >> Process record: inferior program stopped. >> >> Program received signal SIGTRAP, Trace/breakpoint trap. >> 0xb7fe3405 in __kernel_vsyscall () >> (gdb) rc >> Continuing. >> >> Breakpoint 2, main () at 1.c:21 >> 21 =A0 =A0 =A0 =A0 =A0 =A0 int =A0 =A0 c =3D 1; >> (gdb) info b >> Num =A0 =A0 Type =A0 =A0 =A0 =A0 =A0 Disp Enb Address =A0 =A0What >> 2 =A0 =A0 =A0 hw breakpoint =A0keep y =A0 0x080483c8 in main at 1.c:21 >> =A0 =A0 =A0 =A0breakpoint already hit 1 time >> (gdb) c >> Continuing. >> >> No more reverse-execution history. >> 0xb7fe3405 in __kernel_vsyscall () >> (gdb) rc >> Continuing. >> >> Breakpoint 2, main () at 1.c:21 >> 21 =A0 =A0 =A0 =A0 =A0 =A0 int =A0 =A0 c =3D 1; >> >> >> Thanks, >> Hui >> > > > Source code for your test case? > > --001636e0a4ab626ecc047795d3c9 Content-Type: text/x-csrc; charset=US-ASCII; name="1.c" Content-Disposition: attachment; filename="1.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g1muyxqz0 Content-length: 582 aW50ICAgICBhID0gMDsKdm9pZApjb29sMiAoKQp7CglwcmludGYgKCJhID0g JWRcbiIsIGEpOwp9CmludApjb29sICgpCnsKICAgICAgIGEgKz0gMzsKCgpj b29sMigpOwoKICAgICAgIHJldHVybiAoYSk7Cn0KaW50Cm1haW4oKQp7CiAg ICAgICBpbnQgICAgIGIgPSAwOwogICAgICAgaW50ICAgICBjID0gMTsKCgoJ cHJpbnRmICgiYSA9ICVkIGIgPSAlZCBjID0gJWRcbiIsIGEsIGIsIGMpOwog ICAgICAgYiA9IGNvb2wgKCk7CglwcmludGYgKCJhID0gJWQgYiA9ICVkIGMg PSAlZFxuIiwgYSwgYiwgYyk7CgoKICAgICAgIGMgKz0gMTsKCXByaW50ZiAo ImEgPSAlZCBiID0gJWQgYyA9ICVkXG4iLCBhLCBiLCBjKTsKICAgICAgIGEg LT0gMjsKCXByaW50ZiAoImEgPSAlZCBiID0gJWQgYyA9ICVkXG4iLCBhLCBi LCBjKTsKCgpyZXR1cm4gKDApOwp9Cg== --001636e0a4ab626ecc047795d3c9--