This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [python][patch] Add temporary breakpoint features to Python breakpoints.
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 09 Sep 2013 12:47:16 -0600
- Subject: Re: [python][patch] Add temporary breakpoint features to Python breakpoints.
- Authentication-results: sourceware.org; auth=none
- References: <522D9D57 dot 5030309 at redhat dot com>
>>>>> "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