Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC/commit] parse breakpoint condition according to breakpoint location
Date: Mon, 10 May 2010 21:28:00 -0000	[thread overview]
Message-ID: <20100510212754.GE7479@adacore.com> (raw)
In-Reply-To: <m3mxw7bmc8.fsf@fleche.redhat.com>

> current_language is a problem global.  It is referenced in a lot of
> places where an argument would be preferable.  E.g., even though
> expressions carry their language, code in valops.c checks the global, so
> you can wind up with odd behavior (at least in theory, I have not tried
> to make a reproducer).  Probably, evaluate_expression should call
> set_language and restore the old language in a cleanup -- though this is
> a workaround and not a clean fix.

I see that you already starting cleaning some things up in that
department :).

The idea of temporarily switching the current_language global is not
even guaranteed to work, because there is the risk that some functions
that we use actually change it again from under us.  For instance, a
while ago, I ran into a situation where a some code set the
current_language before calling a parsing routine; but that did not work
because the parsing routine called get_current_frame which had a
side-effect of changing the current_language!

> Once the condition is successfully parsed, it seems to me that any
> re-parsing should be done with that same language.

Agreed 100%.

> Maybe this is already accomplished by the set_language calls in
> breakpoint.c, I'm not sure.

I do not think so. I need to work on that followup email I was
referring to (I'm in Paris right now, spending most of my days
meeting with people). I'll do that now...

-- 
Joel


  reply	other threads:[~2010-05-10 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09 17:58 Joel Brobecker
2010-05-10 19:15 ` Tom Tromey
2010-05-10 21:28   ` Joel Brobecker [this message]
2010-05-17 17:28 ` Joel Brobecker

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=20100510212754.GE7479@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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