From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6137 invoked by alias); 6 Oct 2010 17:54:59 -0000 Received: (qmail 6121 invoked by uid 22791); 6 Oct 2010 17:54:58 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-iw0-f169.google.com (HELO mail-iw0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Oct 2010 17:54:52 +0000 Received: by iwn2 with SMTP id 2so456238iwn.0 for ; Wed, 06 Oct 2010 10:54:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.85.206 with SMTP id p14mr14348232ibl.89.1286387691054; Wed, 06 Oct 2010 10:54:51 -0700 (PDT) Received: by 10.231.205.129 with HTTP; Wed, 6 Oct 2010 10:54:51 -0700 (PDT) In-Reply-To: <20101006170619.GA2784@adacore.com> References: <4CABB53A.8000101@vmware.com> <20101006085132.GA11910@host1.dyn.jankratochvil.net> <20101006170619.GA2784@adacore.com> Date: Wed, 06 Oct 2010 17:54:00 -0000 Message-ID: Subject: Re: disable objective-c stuff when theres no objective-c cu. From: Matt Rice To: Joel Brobecker Cc: Jan Kratochvil , Michael Snyder , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2010-10/txt/msg00081.txt.bz2 On Wed, Oct 6, 2010 at 10:06 AM, Joel Brobecker wro= te: >> 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. =A0and 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. yeah, thats what we currently do though, so this is a much larger change of rewriting linespec i suppose. > 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. =A0Various 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. =A0More particularly, > I don't think that linespect should have to handle "break [foo]" > when not in objc mode. I'm alright with 'inferring' the linespec parsing based on the current language I suppose, I just don't think that the user should have to 'set language objective-c' to set a breakpoint in a language which is *not* the current language, because if the user were to subsequently do p foo and the scope was a c++ class, then it would look for self->foo instead of this->foo. so if that means something like 'break objc:[something orOther]' and being able to drop the objc: if the current language is objc thats ok I= MO.