Anyone else things this is useful? Here's a 5 minute hack at it.
It allows for e.g.:
(top-gdb) watch $rax
Watchpoint 4: $rax
(top-gdb) c
Continuing.
Watchpoint 4: $rax
Old value = 11802104
New value = 140737488347216
0x0000000000456647 in main (argc=1, argv=0x7fffffffe158) at ../../src/gdb/gdb.c:28
28 memset (&args, 0, sizeof args);
(top-gdb)
Current GDB will successfuly create the watchpoint in the
breakpoint list, but it never triggers, because since the
watchpoint isn't watching any memory, it ends up with
no bp_location associated.
For extra fun, even watching $_siginfo works.