From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9226 invoked by alias); 23 May 2008 18:34:53 -0000 Received: (qmail 9215 invoked by uid 22791); 23 May 2008 18:34:53 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 May 2008 18:34:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 29B972A98CE; Fri, 23 May 2008 14:34:34 -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 2daRaUKxrJ4c; Fri, 23 May 2008 14:34:34 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E81AB2A98D1; Fri, 23 May 2008 14:34:33 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id EAF38E7ACD; Fri, 23 May 2008 11:34:31 -0700 (PDT) Date: Sat, 24 May 2008 08:18:00 -0000 From: Joel Brobecker To: Andreas Schwab Cc: gdb-patches@sourceware.org Subject: Re: Avoid decode_objc clobbering current language Message-ID: <20080523183431.GK4080@adacore.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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: 2008-05/txt/msg00689.txt.bz2 Hi Andreas, > The problem is that sal_decode_line_1 (here called from > breakpoint_re_set_one) calls decode_objc, which indirectly calls > get_selected_frame. Since the program is just being started there is no > selected frame yet, thus get_selected_frame called select_frame, which > re-sets current_language (typically to language_c). Thus the > set_language call in breakpoint_re_set_one is useless. This is an issue that I'm planning to address properly. I had some plans earlier this year to do it, but then decided to think about it some more. Basically, the idea is to reduce the use of the current_language to the minimum, which is use it as the context when the user enters a command. It's one of the things that I want to get done around July to September. > 2008-05-21 Andreas Schwab > > * linespec.c (decode_objc): Save current language around call to > get_selected_block. In the meantime, I think that this is reasonable. Eventually when the change mentioned above gets under way, I will remove your change. I feel confident that it will not be missed, because I will have to review all the uses of current_language anyway. I hope I'm not missing something! So, if you confirm that this caused no regression, please go ahead and commit. -- Joel