GDB library to insert and delete watchpoints

Dave Korn dave.korn.cygwin@googlemail.com
Tue Dec 1 18:08:00 GMT 2009


Paul Pluzhnikov wrote:
> On Mon, Nov 30, 2009 at 3:18 PM, Aravinda <aravindakidambi@> wrote:

>> 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.

  I think this is a misunderstanding; I think Aravinda is referring to the x86
watchpoint support functions, which the internals documentation does indeed
describe as "a generic library of functions [ ... that x86-based ports can use
to implement support for watchpoints and hardware-assisted breakpoints ...]"

http://sourceware.org/gdb/current/onlinedocs/gdbint/Algorithms.html#index-x86-debug-registers-40

  Aravinda, they're only useful within the gdb executable itself; they don't
form a standalone library that could be loaded into a kernel module.  Of
course you could always rip the relevant sources out of gdb and hack them up
into something useful - assuming you're using an x86 target that is.

    cheers,
      DaveK



More information about the Gdb mailing list