GDB hardware watchpoint information on i386
Jan Kratochvil
jan.kratochvil@redhat.com
Mon Aug 2 06:58:00 GMT 2010
On Mon, 02 Aug 2010 06:10:31 +0200, Shrikanth Kamath wrote:
> I am specifically looking for information about "hooking" my own handler to
> service the watchpoint interrupt rather than needing to invoke a GDB session
> and press 'c'.
Besides GDB hacking isn't it enough for you to use `commands' with `continue'
and associate arbitrary commands (`backtrace' here) in the GDB CLI interface?
Regards,
Jan
(gdb) watch v
Hardware watchpoint 1: v
(gdb) commands
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>backtrace
>continue
>end
(gdb) run
Starting program: var
Hardware watchpoint 1: v
Old value = 0
New value = 1
f () at var.c:7
7 }
#0 f () at var.c:7
#1 0x00000000004004a7 in main () at var.c:20
Hardware watchpoint 1: v
Old value = 1
New value = 0
g () at var.c:13
13 }
#0 g () at var.c:13
#1 0x00000000004004ac in main () at var.c:21
Hardware watchpoint 1: v
Old value = 0
New value = 1
f () at var.c:7
7 }
#0 f () at var.c:7
#1 0x00000000004004a7 in main () at var.c:20
Hardware watchpoint 1: v
[...]
More information about the Gdb
mailing list