Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Armando Miraglia <arma2ff0@gmail.com>, gdb@sourceware.org
Subject: Re: Custom catchpoints with Python API
Date: Tue, 02 Dec 2014 13:14:00 -0000	[thread overview]
Message-ID: <547DBB3E.80601@redhat.com> (raw)
In-Reply-To: <CAOcbMd3T-795LEWW5v8=jGXrzC=kN+ixa4hqfS6w-uSBWo4gGw@mail.gmail.com>

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


      reply	other threads:[~2014-12-02 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 10:46 Armando Miraglia
2014-12-02 13:14 ` Phil Muldoon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=547DBB3E.80601@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=arma2ff0@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox