This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Hardware watchpoint for read
- From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- To: Xin Tong <xerox dot time dot tech at gmail dot com>
- Cc: "Gustavo, Luis" <luis_gustavo at mentor dot com>, gdb at sourceware dot org
- Date: Thu, 03 May 2012 23:17:54 +0200
- Subject: Re: Hardware watchpoint for read
- References: <CALKntY3aH8amKnr9kZFBKQZEawvFzADiDo+t9Yj_gcx4Qy-kXQ@mail.gmail.com> <4F96A614.3040303@mentor.com> <CALKntY2EC1CUsO=Eavfh23WtQFsJCt8ANEhddL9Deeuyiw+iug@mail.gmail.com> <4F96A812.4000008@mentor.com> <CALKntY0TGK7YK+Ns5ck6B7=aVd9pSz4T__qe8BYjDRL9S3aR2g@mail.gmail.com> <4F96B68C.3050703@mentor.com> <CALKntY0MN4hp8QE6h2EAdmWFB6SivcrXMMnxsZ_sdJaS9u4yeA@mail.gmail.com> <4F96C2A7.2010206@mentor.com> <CALKntY2KhN9x4pdNT0VOYXb-vp3a01DaGQkn-VHcmYGnyoNxrw@mail.gmail.com> <4F97E547.4070307@mentor.com> <30865C01C5AF4B6B9B01901B792C4EF5@soleil> <CALKntY1qTnXd1g2dEXzitTWH6Q2zD5HNu2NaAvfk7GaME=JjVw@mail.gmail.com>
On Thu, 2012-05-03 at 15:41 -0400, Xin Tong wrote:
> The breakpoint instructions (int 3 on x86) are inserted in the
> translation process ?
Valgrind gdbserver implements breakpoints during code translation
by inserting calls to a Valgrind "helper" procedure.
You can use a Valgrind gdbserver monitor command to inspect
the translation:
v.translate <addr> [<traceflags>] : debug translation of <addr> with <traceflags>
(default traceflags 0b00100000 : show after instrumentation)
An additional flag 0b100000000 allows to show gdbserver instrumentation
read/write/access watchpoints are implemented on top of memcheck
"addressability" V bits. memcheck is the only Valgrind tool that
implements watchpoints.
Philippe