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