From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20022 invoked by alias); 18 Sep 2012 18:55:55 -0000 Received: (qmail 20012 invoked by uid 22791); 18 Sep 2012 18:55:54 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Sep 2012 18:55:40 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A4A681C7581; Tue, 18 Sep 2012 14:55:39 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xrrlHcHXlnvS; Tue, 18 Sep 2012 14:55:39 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 60AA71C7505; Tue, 18 Sep 2012 14:55:39 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id EEE9BCAE07; Tue, 18 Sep 2012 11:55:35 -0700 (PDT) Date: Tue, 18 Sep 2012 18:55:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] wrong language used when re-setting breakpoint Message-ID: <20120918185535.GG3276@adacore.com> References: <1347928803-15526-1-git-send-email-brobecker@adacore.com> <87k3vrxu2o.fsf@fleche.redhat.com> <20120918150542.GD3276@adacore.com> <878vc7xlxu.fsf@fleche.redhat.com> <20120918181839.GF3276@adacore.com> <87sjafw5ky.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sjafw5ky.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00373.txt.bz2 > 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