This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [python] Expose some breakpoint operations to Python
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 Jun 2011 15:46:14 +0100
- Subject: Re: [patch] [python] Expose some breakpoint operations to Python
- References: <m3tybgn2tl.fsf@redhat.com> <201106231507.14817.pedro@codesourcery.com>
- Reply-to: pmuldoon at redhat dot com
Pedro Alves <pedro@codesourcery.com> writes:
>> What do you think?
>
> Well, here's my kneee jerk reaction. Last night I started converting
> all breakpoints to use breakpoint_ops, and I immediately stumbled on
> the fact that the print_one method doesn't appear to work as is. I
> don't like the idea of exposing the API as is and getting stuck
> with it when we haven't even made sure it's a good fit for
> gdb's own regular breakpoints. :-(
I'm curious to know what is wrong with it. print_one just passes the
breakpoint and the address to the consumer, and the consumer then just
prints to the "Addr" and "What" fields. In the strict context of the
API, it works in the Python tests.
Can you expand on that instance?
OTOH, in a larger sense, I agree with your internal API statement. If
it is not suitable yet, we should not expose it yet. For example the
"print_it" enum 'SRC_ONLY' just prints a source-line number (without a
file). I cannot fathom how it would be useful. Then again, there is
lots that I do not consider useful, but it is in some other GDB context.
If you have a plan for the API, could your write it up? I am ready and
willing to help out wherever and whenever needed.
Cheers
Phil
--
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson
(USA), Charlie Peters (USA)