Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Shrikanth Kamath <shrikanth07@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: GDB hardware watchpoint information on i386
Date: Mon, 02 Aug 2010 06:58:00 -0000	[thread overview]
Message-ID: <20100802065802.GA12049@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <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

[...]


  parent reply	other threads:[~2010-08-02  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  4:10 Shrikanth Kamath
2010-08-02  5:53 ` paawan oza
2010-08-02  6:58 ` Jan Kratochvil [this message]
2010-08-02  7:55   ` Shrikanth Kamath
2010-08-02  8:09     ` Jan Kratochvil
2010-08-02  8:16     ` paawan oza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100802065802.GA12049@host1.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=shrikanth07@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox