This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix hw watchpoints in process record.


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...
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]