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: [python][patch] Add temporary breakpoint features to Python breakpoints.


>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:

Phil> This patch allows Python breakpoints to be made temporary on
Phil> creation.  It adds an optional argument, and keyword: "temporary".

Phil> OK?

Thanks, Phil.

Phil> 2013-09-09  Phil Muldoon  <pmuldoon@redhat.com>

Phil> 	* python/py-breakpoint.c (bppy_get_temporary): New function.
Phil> 	(bppy_init): New keyword: temporary. Parse it and set breakpoint
Phil> 	to temporary if True.

Is there a PR associated with this?
I thought there was, but I didn't check.

Phil> +@defvar Breakpoint.temporary
Phil> +This attribute indicates whether the breakpoint was created as a
Phil> +temporary breakpoint.  Temporary breakpoints are automatically deleted
Phil> +after that breakpoint has been hit.  Access to this attribute, and all
Phil> +other attributes and functions other than the @code{is_valid}
Phil> +function, will result in an error after the breakpoint has been hit
Phil> +(as it has been automatically deleted).  This attribute is not
Phil> +writable.

I think it is worth spelling out what "hit" means.
In particular I was wondering how it interacts with the "stop" method.

Phil> +  if (self_bp->bp->disposition == disp_del ||
Phil> +      self_bp->bp->disposition == disp_del_at_next_stop)

"||" at the wrong spot.

Phil> +  static char *keywords[] = { "spec", "type", "wp_class", "internal", "temporary", NULL };

This line is too long.

Phil> +  if (temporary)

temporary != NULL

Tom


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