From: Hui Zhu <teawater@gmail.com>
To: Michael Snyder <msnyder@vmware.com>,
Pedro Alves <pedro@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Fix hw watchpoints in process record.
Date: Sun, 22 Nov 2009 02:11:00 -0000 [thread overview]
Message-ID: <daef60380911211810i5ee040cfk7f646bc6011489e1@mail.gmail.com> (raw)
In-Reply-To: <4B084394.4010304@vmware.com>
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 <a>
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 <printf@plt>
0x000000000040057d <+49>: mov $0x0,%eax
0x0000000000400582 <+54>: callq 0x400527 <cool>
0x0000000000400587 <+59>: mov %eax,-0x4(%rbp)
0x000000000040058a <+62>: mov 0x200aa0(%rip),%esi # 0x601030 <a>
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 <printf@plt>
0x00000000004005a5 <+89>: addl $0x1,-0x8(%rbp)
0x00000000004005a9 <+93>: mov 0x200a81(%rip),%esi # 0x601030 <a>
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 <printf@plt>
0x00000000004005c4 <+120>: mov 0x200a66(%rip),%eax # 0x601030 <a>
0x00000000004005ca <+126>: sub $0x2,%eax
0x00000000004005cd <+129>: mov %eax,0x200a5d(%rip) # 0x601030 <a>
0x00000000004005d3 <+135>: mov 0x200a57(%rip),%esi # 0x601030 <a>
0x00000000004005d9 <+141>: mov -0x8(%rbp),%ecx
0x00000000004005dc <+144>: mov -0x4(%rbp),%edx
0x00000000004005df <+147>: mov $0x4006f4,%edi
---Type <return> to continue, or q <return> 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 <msnyder@vmware.com> 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...
>
next prev parent reply other threads:[~2009-11-22 2:11 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-01 1:23 Michael Snyder
2009-11-04 3:01 ` Hui Zhu
2009-11-04 17:51 ` Michael Snyder
2009-11-05 1:41 ` Hui Zhu
2009-11-05 18:41 ` Michael Snyder
2009-11-05 19:09 ` Pedro Alves
2009-11-12 0:27 ` Pedro Alves
2009-11-20 18:11 ` Michael Snyder
2009-11-21 9:41 ` Hui Zhu
2009-11-21 12:05 ` Pedro Alves
2009-11-21 19:50 ` Michael Snyder
2009-11-22 2:11 ` Hui Zhu [this message]
2009-11-22 12:56 ` Pedro Alves
2009-11-22 15:45 ` Pedro Alves
2009-11-22 19:22 ` Eli Zaretskii
2009-11-24 1:58 ` Pedro Alves
2009-11-26 2:28 ` Hui Zhu
2009-11-22 15:50 ` Pedro Alves
2009-11-22 20:21 ` Michael Snyder
2009-11-22 23:03 ` Pedro Alves
2009-11-23 3:17 ` Hui Zhu
2009-11-09 3:18 ` Hui Zhu
2009-11-09 21:20 ` Michael Snyder
2009-11-10 7:39 ` Hui Zhu
2009-11-09 17:48 ` Tom Tromey
2009-11-10 23:32 ` Michael Snyder
2009-11-11 8:49 ` Hui Zhu
2009-11-12 0:05 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daef60380911211810i5ee040cfk7f646bc6011489e1@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
--cc=pedro@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox