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: [RFA] wrong language used when re-setting breakpoint
Date: Tue, 18 Sep 2012 18:55:00 -0000	[thread overview]
Message-ID: <20120918185535.GG3276@adacore.com> (raw)
In-Reply-To: <87sjafw5ky.fsf@fleche.redhat.com>

> My concern was really that your patch might be obscuring some other bug.
> But, it sounds like this other bug no longer exists.  In that case I
> think your patch is a cleanup and should stay in.

Makes sense. Thank you.

In the meantime, I have found the source of the language switch, and
I know why you're not seeing it.  There is a function called
ada-lang.c:add_symbols_from_enclosing_procs which is empty in the
official tree, but starts with the following code in our tree:

   frame = deprecated_safe_get_selected_frame ();

(not sure why this code hasn't been contributed yet, I will look into
that this winter after Xmas).

This function gets called during the breakpoint re-set phase of
the "nested_sub" breakpoint, via the ada_lookup_symbol_list function.
The exact sequence is:
    ada_lookup_symbol_list
    -> ada_add_local_symbols
    -> add_symbols_from_enclosing_procs
    -> deprecated_safe_get_selected_frame
    [...]
    -> select_frame
    -> set_language

The frame in question is in the loader (/usr/lib/debug/lib/ld-2.11.1.so).

You can probably reproduce the same problem by adding the call in
your version of add_symbols_from_enclosing_procs. Perhaps we (AdaCore)
should also do something to avoid the language-switch side-effect,
but I am hesitant to do anything, because I'm thinking I might affect
something else later on.

-- 
Joel


  reply	other threads:[~2012-09-18 18:55 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
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 [this message]
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=20120918185535.GG3276@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