This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB hardware watchpoint information on i386
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Shrikanth Kamath <shrikanth07 at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 2 Aug 2010 08:58:02 +0200
- Subject: Re: GDB hardware watchpoint information on i386
- References: <AANLkTikFecQ_fq7S=WToUbY9RziM9A98nJgKvXdodEVs@mail.gmail.com>
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
[...]