From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17044 invoked by alias); 18 Sep 2012 14:52:00 -0000 Received: (qmail 17030 invoked by uid 22791); 18 Sep 2012 14:51:59 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Sep 2012 14:51:46 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8IEpiuZ010375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Sep 2012 10:51:44 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8IEph9I018245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 18 Sep 2012 10:51:44 -0400 From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA] wrong language used when re-setting breakpoint References: <1347928803-15526-1-git-send-email-brobecker@adacore.com> Date: Tue, 18 Sep 2012 14:52:00 -0000 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") Message-ID: <87k3vrxu2o.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/msg00363.txt.bz2 >>>>> "Joel" == Joel Brobecker 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