This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add an evaluation function hook to Python breakpoints.
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Doug Evans <dje at google dot com>, gdb-patches at sourceware dot org
- Date: Wed, 05 Jan 2011 20:23:07 +0000
- Subject: Re: [patch] Add an evaluation function hook to Python breakpoints.
- References: <m38vztlr2r.fsf@redhat.com> <AANLkTimS_32d+7phemj95qCSdJzgXXOxjMhbt_9+i8D6@mail.gmail.com> <m34oags1q1.fsf@fleche.redhat.com> <AANLkTimVN=3CKL2VmKWERSmGxiMA7wDv7pMrSQZc1DMO@mail.gmail.com> <m3ipyulpop.fsf@fleche.redhat.com> <AANLkTim_wXWA2OX1GdZ_rFVwBAr+YjO+B5SSVUN_g0vK@mail.gmail.com> <m3fwtq51zj.fsf@fleche.redhat.com> <AANLkTikk03p4m+s0k+UD8RRVy8YL7wYZsLhy2GNc6d8q@mail.gmail.com> <m31v594w65.fsf@fleche.redhat.com> <AANLkTi=b7=b6FZLjLBCZAqcwaAMnYVTTqTB1Z3dOHSd1@mail.gmail.com> <m3sjx7urkv.fsf@fleche.redhat.com>
- Reply-to: pmuldoon at redhat dot com
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Doug" == Doug Evans <dje@google.com> writes:
I just came back from Christmas vacation today, so apologies for this
thread time-gap.
> Doug> The user will see the normal breakpoint output, and then be expected
> Doug> to know that the breakpoint is special (e.g., a rule was violated and
> Doug> that s/he needs to pay attention to what the rule was). Is there a
> Doug> plan to have something more? [Or am I missing something?]
>
> Yeah, we want to expose some of the breakpoint_ops stuff to python.
Yeah ultimately this was going to be series of patches (the first being
this, the ability to write conditions entirely within Python), but the
whole-story (from these threads) has probably shown we need to think
about the solution in totality, not incrementally.
> Doug> Sorry, maybe I was too subtle.
> Doug> If one is using this facility to implement a rule checker that stops
> Doug> when the rule is violated, and one sets another breakpoint at the same
> Doug> location, when the program stops how does one know whether the rule
> Doug> was violated or not?
>
> One does not. This is a pre-existing problem in gdb.
>
>
> Phil, let's withdraw this patch until some later time when we have
> worked out the issues. We can continue to discuss on the archer list.
>
> I think we should at least deal with exposing to Python the bits needed
> to customize breakpoint notifications.
>
> Also we should write a couple real-life uses of this to make sure it is
> working ok.
That's ok, no worries. On that note, I keep a separate branch of my
Python breakpoints improvements patches over on archer within the
archer-pmuldoon-python-breakpoints branch. That is always open for
folks to pull and comment on.
We need to determine a concrete API plan though. What do we need these
improvements to do? The only concrete action I saw was the ability to
override breakpoint operations. (And probably a callback into the
python api to return the appropriate message).
What else?
Cheers
Phil