From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1863 invoked by alias); 22 Nov 2009 20:21:21 -0000 Received: (qmail 1855 invoked by uid 22791); 22 Nov 2009 20:21:21 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Nov 2009 20:20:17 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 1BA4959052; Sun, 22 Nov 2009 12:20:15 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id 12BAFCD90B; Sun, 22 Nov 2009 12:20:15 -0800 (PST) Message-ID: <4B099C28.5000607@vmware.com> Date: Sun, 22 Nov 2009 20:21:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: Hui Zhu CC: Pedro Alves , "gdb-patches@sourceware.org" Subject: Re: [RFA] Fix hw watchpoints in process record. 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00481.txt.bz2 Hui Zhu wrote: > 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. Ouch, yeah, that looks like a decr_pc_after_break issue maybe? > 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... >>