This is the mail archive of the gdb-patches@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: [0/6] breakpoints_ops for all kinds of breakpoints


Pedro Alves <pedro@codesourcery.com> writes:

> On Friday 22 July 2011 18:32:59, Phil Muldoon wrote:
>> I think it is great.  It clears up several (dozen) ambiguities with
>> breakpoint operations.  I don't think this will affect the Python
>> breakpoint_ops work (other than some refactoring, but we'll come to that
>> bridge when your work is checked in).
>
> Yeah, I don't think your current patch would need more than a
> some trivial updates, but then again, I did leave the print_one
> method behind in this conversion, which was the method that
> I raised having the issue that doesn't seem to fit for gdb's own
> breakpoints currently, so we should clean that up before
> considering exposing it as public API.

I have been thinking on your comments quite a bit in the last few
weeks, and about external facing APIs in general.  I don't think it is
sensible to make 1:1 mappings of these breakpoint_ops APIs
to Python.  I think "print_one" "print_it" mean nothing to a Python
scripting user.  I've come to the conclusion that we should abstract
these functions to concepts a Python scripter can better understand.  So
"print_one" will not be directly exposed as before.  The Python API,
will end up calling print_one, sure, but there will (I hope) be
sufficient levels of abstraction that any future refactoring will be
coped with internally.  We already massage the data to-and-from GDB
extensively anyway, so it makes better sense to the user.  

So my plan is to submit a patch after yours is checked in, with the new
APIs.  We can look again, then, if it makes sense at that point, and if
any future refactorings of print_one will really matter to the user from
an API perspective.

Cheers,

Phil


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