From: Shrikanth Kamath <shrikanth07@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: GDB hardware watchpoint information on i386
Date: Mon, 02 Aug 2010 07:55:00 -0000 [thread overview]
Message-ID: <AANLkTim7=AoN7Mi5L=Q8tTbvn1_3xzhK7V8OfDvj1BUQ@mail.gmail.com> (raw)
In-Reply-To: <20100802065802.GA12049@host1.dyn.jankratochvil.net>
Decent enough Jan. Okay, from internals perspective, say I have
written the "commands" to be executed when the watchpoint is hit,
which function
inside GDB maps this action(s) to the watchpoint trap?
I mean there would be
foo_service_watchpoint()
{
/* map actions to this watchpoint */
}
which is this function?
--
Shrikanth R K
On Mon, Aug 2, 2010 at 12:28 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> 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
>
> [...]
>
next prev parent reply other threads:[~2010-08-02 7:55 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
2010-08-02 7:55 ` Shrikanth Kamath [this message]
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='AANLkTim7=AoN7Mi5L=Q8tTbvn1_3xzhK7V8OfDvj1BUQ@mail.gmail.com' \
--to=shrikanth07@gmail.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.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