From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23039 invoked by alias); 13 Oct 2009 00:44:46 -0000 Received: (qmail 23018 invoked by uid 22791); 13 Oct 2009 00:44:45 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_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, 13 Oct 2009 00:44:40 +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.13.8/8.13.8) with ESMTP id n9D0iFFJ004303; Mon, 12 Oct 2009 20:44:15 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9D0iEjQ021011; Mon, 12 Oct 2009 20:44:14 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n9D0iDVb023873; Mon, 12 Oct 2009 20:44:13 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EA62B378216; Mon, 12 Oct 2009 18:44:12 -0600 (MDT) From: Tom Tromey To: Joel Brobecker Cc: Matt Rice , gdb-patches@sourceware.org Subject: Re: gdb.objc/objcdecode.exp test error.. References: <8ba6bed40903051731s41c9183aha18af51113f3c0ea@mail.gmail.com> <20090306173345.GI3744@adacore.com> <200903061913.43419.pedro@codesourcery.com> <8ba6bed40903070407q3e91f0ffs6fc67b2b9c329081@mail.gmail.com> <8ba6bed40903080716k3fbeb56t5605aef1864b26a3@mail.gmail.com> <8ba6bed40903081910t695c9d93jc34ba1c5d2793a2e@mail.gmail.com> <8ba6bed40909110443v61597c4ci7effd224ce26f937@mail.gmail.com> <20090924005319.GD5134@adacore.com> Reply-To: tromey@redhat.com Date: Tue, 13 Oct 2009 00:44:00 -0000 In-Reply-To: <20090924005319.GD5134@adacore.com> (Joel Brobecker's message of "Wed, 23 Sep 2009 17:53:19 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-10/txt/msg00254.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: [...] Joel> I really think that allowing the above shortcut is a mis-feature Joel> that we should consider removing. We could possibly think about Joel> introducing another syntax meaning all "create" methods in all Joel> classes, if it really is needed by ObjC developers. Joel> Another, more compromising approach, might be to start searching Joel> ObjC method only when we did not find a symbol with that name. Joel> In other words, do a pure C/C++ match first, and if nothing found, Joel> then try objective-C. We could conditionalize that to the current Joel> language being objective-c, but I have the feeling that this is Joel> contrary to the spirit of the current code. I tend to think that the results should depend a bit on the current language. If the current language is C, I think we should require full qualification of the name. So, "break foo" would just find a function named "foo", but "break x::y" would look at various C++ functions. However, we could give languages a method that could short-circuit this search a bit. That way something like "break func" in C++ could consider the current context and do C++-style name lookup. I think this would yield a natural result for C++ programmers. If we did this, then "break create" in C mode would only find the C function of that name, but the ObjC code would be free to make "break create" do whatever searching ObjC programmers deem reasonable. Whether other languages accept all the forms accepted by C is open to debate. I think C must be a special case because it is the default language, and we want users to be able to start gdb and set a breakpoint without an intervening "set language". What do you think? Tom