This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v1 05/13] script language API for GDB: breakpoint changes
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: xdje42 at gmail dot com, gdb-patches at sourceware dot org
- Date: Fri, 06 Dec 2013 12:48:50 +0000
- Subject: Re: [PATCH v1 05/13] script language API for GDB: breakpoint changes
- Authentication-results: sourceware.org; auth=none
- References: <52a16634 dot 43da440a dot 47b4 dot ffffb9a3 at mx dot google dot com>
On 06/12/13 05:52, xdje42@gmail.com wrote:
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 111660f..4064e7b 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -1052,10 +1052,11 @@ condition_command (char *arg, int from_tty)
> it, and if it has a definition of the "stop"
> method. This method and conditions entered into GDB from
> the CLI are mutually exclusive. */
> - if (b->py_bp_object
> - && gdbpy_breakpoint_has_py_cond (b->py_bp_object))
> - error (_("Cannot set a condition where a Python 'stop' "
> - "method has been defined in the breakpoint."));
> + if (breakpoint_has_script_cond (b, SCRIPT_LANG_NONE))
> + {
> + error (_("Cannot set a condition where a scripting language"
> + " 'stop' method has already been defined."));
> + }
> set_breakpoint_condition (b, p, from_tty);
As you moved the entire check into the Python ops structure, it occurs
to me that we might have to tweak struct breakpoint. Instead of
having each language attach its object to struct breakpoint, we just
make the pointer to the scripting object void * (and rename it to
bp->script_object). I think this would be OK as only one scripting
language may attach a condition call-back to a breakpoint? What do you
think?
Cheers,
Phil