From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5560 invoked by alias); 5 Mar 2007 12:41:52 -0000 Received: (qmail 5549 invoked by uid 22791); 5 Mar 2007 12:41:51 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 05 Mar 2007 12:41:47 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HOCVc-0001vq-4f; Mon, 05 Mar 2007 07:41:44 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HOCVb-0003sP-Ud; Mon, 05 Mar 2007 07:41:43 -0500 Date: Mon, 05 Mar 2007 12:41:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: Breaking in a c++ method with current language set to c. Message-ID: <20070305124143.GA14835@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org References: <45EB906B.6070408@portugalmail.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45EB906B.6070408@portugalmail.pt> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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: 2007-03/txt/msg00035.txt.bz2 On Mon, Mar 05, 2007 at 03:37:15AM +0000, Pedro Alves wrote: > I've looked at several ways to fix it, and all but this one turned out more > invasive than I hoped for, because current_language is used in a several > places > (in symtab.c). Instead, I simply wrapped linespec.c:find_method with a > set_language (lang of A), guarded with a cleanup. How much invasive? I don't like the global "current language"; like the global "selected frame", it's prone to this sort of problem when we'd really rather be looking at a different language. -- Daniel Jacobowitz CodeSourcery