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: Custom catchpoints with Python API


On 02/12/14 10:46, Armando Miraglia wrote:
> Hi everybody.
>
> this is my first intervention here on the mainling list, so I hope I
> will be asking the right question in the right place :)
>
> First of all, thanks a lot for the great job done with GDB.
>
> As the subject suggests, my question relates the Python API of GDB. I
> am writing a GDB Python extension for a University project and so far
> I managed to do a lot. However, I am having difficulties finding a way
> to create custom Catchpoints similarly to what I have been doing with
> Breakpoints. I see that extending gdb.Breakpoints I can create custom
> breakpoints and watchpoints but I have not managed to find a way to
> instantiate a class for a catchpoint that invokes my own code.
> Is this even possible right now?

No, not right now.  Catchpoints internally extend something called
breakpoint operations (basically a struct of function pointers that
"do something" when a catchpoint is triggered).  There was a nascent
patch to do this in Python some years ago, but it was deemed the
internal breakpoint operations structure was not sufficiently evolved
to expose to the Python API.  There was supposed to be a breakpoint
refactor at one point, but I am not sure if that ever happened.

Cheers

Phil


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