This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB library to insert and delete watchpoints


On Mon, Nov 30, 2009 at 3:18 PM, Aravinda <aravindakidambi@gmail.com> wrote:

> Im working on a project that currently requires inserting and deleting
> watchpoints to monitor buffer overruns.

AFAIU, on x86 you can monitor at most 4 addresses, since that's all
the debug registers it got. That makes using HW watchpoints for
overrun detection of dubious value (unless you only care about
overrunning a very small set of buffers).

> I was looking at the
> gdb-internals documentation which talks about a gdb library that can
> be used to do exactly this.

It can't be (at lease not without a lot of work). Please see this
message and thread: http://sourceware.org/ml/gdb/2009-08/msg00003.html

> But I couldnt find more info on this. Im
> looking for a ready to use library to be used with a kernel module
> that allows for modifying the debug registers. kindly point me to any
> sources if it can be done.

AFAICT, such a library does not exist.

Cheers,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]