public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: xdje42@gmail.com, gdb-patches@sourceware.org
Subject: Re: [PATCH v1 05/13] script language API for GDB: breakpoint changes
Date: Fri, 06 Dec 2013 12:49:00 -0000	[thread overview]
Message-ID: <52A1C7B2.8050505@redhat.com> (raw)
In-Reply-To: <52a16634.43da440a.47b4.ffffb9a3@mx.google.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

  reply	other threads:[~2013-12-06 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06  5:53 xdje42
2013-12-06 12:49 ` Phil Muldoon [this message]
2013-12-06 17:25   ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A1C7B2.8050505@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=xdje42@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).