Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] wrong language used when re-setting breakpoint
Date: Tue, 18 Sep 2012 14:52:00 -0000	[thread overview]
Message-ID: <87k3vrxu2o.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1347928803-15526-1-git-send-email-brobecker@adacore.com> (Joel	Brobecker's message of "Mon, 17 Sep 2012 17:40:03 -0700")

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

Joel> The reason behind the error is that the linespec code that re-sets
Joel> the breakpoints uses the current_language global when iterating
Joel> over a symtab's symbols. However, the that global gets switched from
Joel> Ada to C during the startup phase, probably as a side-effect of stopping
Joel> in some system code for which debugging info is available. The fix
Joel> is to make sure that we use the correct language.

I think the breakpoint re-setting code should be temporarily setting
current_language.  breakpoint_re_set does this.

I see that linespec now is trying to treat the current language as a
parameter, not a global.  I think that's a good idea, but I wonder
whether it is done consistently enough.  For instance, does linespec
really not call anything that might implicitly use the global?  (I
expect at least expression parsing...).  And offhand I see a use of
current_language in get_search_block.

I don't have a problem with your patch.  I think it is an improvement.
But I think it is important to understand why the current mechanism
isn't working, since I think a failure here may have other bad effects
as well.

Tom


  reply	other threads:[~2012-09-18 14:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  0:40 Joel Brobecker
2012-09-18 14:52 ` Tom Tromey [this message]
2012-09-18 15:06   ` Joel Brobecker
2012-09-18 17:36     ` Tom Tromey
2012-09-18 17:47     ` Tom Tromey
2012-09-18 18:18       ` Joel Brobecker
2012-09-18 18:26         ` Tom Tromey
2012-09-18 18:55           ` Joel Brobecker
2012-09-18 19:16             ` Tom Tromey

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=87k3vrxu2o.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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