From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25344 invoked by alias); 6 Oct 2010 17:06:36 -0000 Received: (qmail 25325 invoked by uid 22791); 6 Oct 2010 17:06:35 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_BJ 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; Wed, 06 Oct 2010 17:06:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E5DCB2BAB4A; Wed, 6 Oct 2010 13:06:21 -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 i0-DKLrAk0BJ; Wed, 6 Oct 2010 13:06:21 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 953BF2BAB47; Wed, 6 Oct 2010 13:06:21 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 164DEF5895; Wed, 6 Oct 2010 10:06:19 -0700 (PDT) Date: Wed, 06 Oct 2010 17:06:00 -0000 From: Joel Brobecker To: Matt Rice Cc: Jan Kratochvil , Michael Snyder , "gdb-patches@sourceware.org" Subject: Re: disable objective-c stuff when theres no objective-c cu. Message-ID: <20101006170619.GA2784@adacore.com> References: <4CABB53A.8000101@vmware.com> <20101006085132.GA11910@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-10/txt/msg00080.txt.bz2 > i could have argued this more concisely, > what I mean is that 'break' is not related to the current language, > but the language which we want to be the current language > when the breakpoint is hit. and so 'set language' to use language > specific breakpoints is arguably wrong because the current language > may not be the language of the breakpoint we want set. But at the same time, I don't think we want to be able to support all languages at the same time. If we can guess the language of the location, great, but I think that's sort of a chicken-and-egg problem. You need to parse the location to determine the language, but you need to determine which language to use in order to parse it. IMO, it's much cleaner to follow the current-language when parsing the breakpoint location. Various languages may want to provide bridges to other syntaxes (for instance, the Obj-C language might want to provide c-like breakpoint expressions), but I don't think that this should be part of the general code. More particularly, I don't think that linespect should have to handle "break [foo]" when not in objc mode. -- Joel