This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][python] Add breakpoint support.
> Date: Mon, 29 Mar 2010 15:53:27 +0100
> From: Phil Muldoon <pmuldoon@redhat.com>
> CC: gdb-patches@sourceware.org
>
> >> +@tindex gdb.Breakpoint
> >> +@tindex Breakpoint
> >
> > You already added index entries with the same names, albeit in
> > different letter-case, elsewhere in the manual. Why is it a good idea
> > to have these here as well?
>
>
> Not sure what you mean here, can you please elaborate?
You have these index entries in your patch:
+@findex gdb.breakpoints
+@defun breakpoints
+@tindex gdb.Breakpoint
+@tindex Breakpoint
They are identical, except for the letter-case.
> >> +If a watchpoint type is not provided, it is assumed to be a @var{WP_READ}
> >> +type.
> >
> > ?? Really? WP_WRITE sounds a more logical choice, as it's the default
> > watchpoint type in GDB.
>
>
> I do not have any strong feelings here. I can make it write by
> default if you think it would be more sensible.
WP_WRITE is what I'd expect, but I'd be interested in what others
think.
> >> +@defivar Breakpoint location
> >> +This attribute holds the location of the breakpoint, as specified by
> >> +the user. It is a string. If the breakpoint does not have a location
> >> +(that is, it is a watchpoint) an exception will be raised.
> >
> > Is it wise to raise an exception? Why not return something sensible
> > instead?
> >
> >> +the user. It is a string. If the breakpoint does not have an
> >> +expression (the breakpoint is not a watchpoint) an exception will be
> >> +raised.
> >
> > Same here.
>
>
> Would returning Py_NONE work?
Yes, I think so.