* Custom catchpoints with Python API
@ 2014-12-02 10:46 Armando Miraglia
2014-12-02 13:14 ` Phil Muldoon
0 siblings, 1 reply; 2+ messages in thread
From: Armando Miraglia @ 2014-12-02 10:46 UTC (permalink / raw)
To: gdb
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?
Thanks a lot!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Custom catchpoints with Python API
2014-12-02 10:46 Custom catchpoints with Python API Armando Miraglia
@ 2014-12-02 13:14 ` Phil Muldoon
0 siblings, 0 replies; 2+ messages in thread
From: Phil Muldoon @ 2014-12-02 13:14 UTC (permalink / raw)
To: Armando Miraglia, gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-02 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-02 10:46 Custom catchpoints with Python API Armando Miraglia
2014-12-02 13:14 ` Phil Muldoon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox