4

I have gdb 7.3 and device that supports hardware watchpoints.

I type such consequent commands:

Breakpoint 1, 0x000db808 in ?? ()
(gdb) info break     
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x000db808 
    breakpoint already hit 1 time
(gdb) watch *0x15588a
Watchpoint 2: *0x15588a
(gdb) watch *0x1557f8
Hardware watchpoint 3: *0x1557f8
(gdb) info break
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x000db808 
    breakpoint already hit 1 time
2       watchpoint     keep y              *0x15588a
3       hw watchpoint  keep y              *0x1557f8
(gdb)

Why wasn't hardware watchpoint accepted after the first command? What is wrong?

Lucky Man
  • 1,488
  • 3
  • 19
  • 41

1 Answers1

4

Why wasn't hardware watchpoint accepted after the first command?

You didn't tell us what processor you are using.

I am guessing that your processor does not support hardware watchpoints for addresses that are not aligned on 4-byte boundary.

GDB can't set a hardware watchpoint on an address if your hardware doesn't support such watchpoints.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • Yes, you are quite right. My ARMv7 processor supports hardware watchpoints only for addresses that are aligned on 4-byte boundary. Thanks a lot! – Lucky Man May 17 '12 at 06:58