From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29516 invoked by alias); 22 Nov 2009 02:11:48 -0000 Received: (qmail 29507 invoked by uid 22791); 22 Nov 2009 02:11:48 -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-f189.google.com (HELO mail-pz0-f189.google.com) (209.85.222.189) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Nov 2009 02:10:44 +0000 Received: by pzk27 with SMTP id 27so3069205pzk.12 for ; Sat, 21 Nov 2009 18:10:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.5.25 with SMTP id 25mr343529wfe.80.1258855843072; Sat, 21 Nov 2009 18:10:43 -0800 (PST) In-Reply-To: <4B084394.4010304@vmware.com> References: <4AECE12F.3000704@vmware.com> <4AF31C1F.2000405@vmware.com> <200911051909.40796.pedro@codesourcery.com> <200911120027.03426.pedro@codesourcery.com> <4B06DAB2.7090409@vmware.com> <4B084394.4010304@vmware.com> From: Hui Zhu Date: Sun, 22 Nov 2009 02:11:00 -0000 Message-ID: Subject: Re: [RFA] Fix hw watchpoints in process record. To: Michael Snyder , Pedro Alves Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 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/msg00468.txt.bz2 I think this patch still not OK. (gdb) start Temporary breakpoint 1 at 0x400554: file 1.c, line 20. Starting program: /home/teawater/gdb/bgdbno/gdb/a.out Temporary breakpoint 1, main () at 1.c:20 20 int b = 0; (gdb) disas Dump of assembler code for function main: 0x000000000040054c <+0>: push %rbp 0x000000000040054d <+1>: mov %rsp,%rbp 0x0000000000400550 <+4>: sub $0x10,%rsp => 0x0000000000400554 <+8>: movl $0x0,-0x4(%rbp) 0x000000000040055b <+15>: movl $0x1,-0x8(%rbp) 0x0000000000400562 <+22>: mov 0x200ac8(%rip),%esi # 0x601030 0x0000000000400568 <+28>: mov -0x8(%rbp),%ecx 0x000000000040056b <+31>: mov -0x4(%rbp),%edx 0x000000000040056e <+34>: mov $0x4006f4,%edi 0x0000000000400573 <+39>: mov $0x0,%eax 0x0000000000400578 <+44>: callq 0x4003f8 0x000000000040057d <+49>: mov $0x0,%eax 0x0000000000400582 <+54>: callq 0x400527 0x0000000000400587 <+59>: mov %eax,-0x4(%rbp) 0x000000000040058a <+62>: mov 0x200aa0(%rip),%esi # 0x601030 0x0000000000400590 <+68>: mov -0x8(%rbp),%ecx 0x0000000000400593 <+71>: mov -0x4(%rbp),%edx 0x0000000000400596 <+74>: mov $0x4006f4,%edi 0x000000000040059b <+79>: mov $0x0,%eax 0x00000000004005a0 <+84>: callq 0x4003f8 0x00000000004005a5 <+89>: addl $0x1,-0x8(%rbp) 0x00000000004005a9 <+93>: mov 0x200a81(%rip),%esi # 0x601030 0x00000000004005af <+99>: mov -0x8(%rbp),%ecx 0x00000000004005b2 <+102>: mov -0x4(%rbp),%edx 0x00000000004005b5 <+105>: mov $0x4006f4,%edi 0x00000000004005ba <+110>: mov $0x0,%eax 0x00000000004005bf <+115>: callq 0x4003f8 0x00000000004005c4 <+120>: mov 0x200a66(%rip),%eax # 0x601030 0x00000000004005ca <+126>: sub $0x2,%eax 0x00000000004005cd <+129>: mov %eax,0x200a5d(%rip) # 0x601030 0x00000000004005d3 <+135>: mov 0x200a57(%rip),%esi # 0x601030 0x00000000004005d9 <+141>: mov -0x8(%rbp),%ecx 0x00000000004005dc <+144>: mov -0x4(%rbp),%edx 0x00000000004005df <+147>: mov $0x4006f4,%edi ---Type to continue, or q to quit---q Quit (gdb) hb *0x000000000040055b During symbol reading, incomplete CFI data; unspecified registers (e.g., rax) at 0x400550. Hardware assisted breakpoint 2 at 0x40055b: file 1.c, line 21. (gdb) record (gdb) c Continuing. Program received signal SIGTRAP, Trace/breakpoint trap. 0x000000000040055c in main () at 1.c:21 21 int c = 1; (gdb) info reg pc pc: 0x40055c The stop pc is not right. Looks we need do some special works when this is a simple hb. Thanks, Hui On Sun, Nov 22, 2009 at 03:46, Michael Snyder wrote: > Hui Zhu wrote: >> >> Hi guys, >> >> There are some patches about hw breakpoint are running on maillist. >> If you don't mind, I suggest we wait until they OK. > > I don't think there are any conflicts... >