From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 632 invoked by alias); 22 Sep 2002 23:02:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 625 invoked from network); 22 Sep 2002 23:02:22 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 22 Sep 2002 23:02:22 -0000 Received: (from jimb@localhost) by zenia.red-bean.com (8.11.6/8.11.6) id g8MMkPg21622; Sun, 22 Sep 2002 17:46:25 -0500 To: David Carlton Cc: gdb-patches@sources.redhat.com, Aidan Skinner , Elena Zannoni Subject: Re: [RFA] delete BLOCK_SHOULD_SORT References: From: Jim Blandy Date: Sun, 22 Sep 2002 16:02:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.90 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-09/txt/msg00564.txt.bz2 It looks good to me. However, before we commit this, I'd really like to know how much worse it makes mdebug-based targets. For example, if the test suite starts timing out a lot after this patch is applied because symbol lookup is so slow, then I think we need to buildsym-ify mdebugread first. However backwards we may find them, people are still using mdebug, and making the test suite unusable would make it impossible for a company like Red Hat to give them a code drop when they need one. You'll need to be testing your namespace work on at least one mdebug-based target anyway, so this shouldn't be much of an additional burden. > I think the changes are pretty straightforward, though I'd appreciate > it if somebody more conversant with ada-lang.c than I am could make > sure I'm not missing anything with my change there. I don't know ada-lang.c, but they look mechanically correct to me. > top = BLOCK_NSYMS (block); > bot = 0; > while (bot < top) > { > sym = BLOCK_SYM (block, bot); > + /* If there is more than one symbol with the right name and > + namespace, we return the first one; I believe it is now > + impossible for us to encounter two symbols with the same > + name and namespace here, because blocks containing > + argument symbols are no longer sorted. The exception is > + for C++, where multiple functions (cloned constructors / > + destructors, in particular) can have the same demangled > + name. So if we have a particular mangled name to match, > + try to do so. */ This comment still refers to sorted blocks. And the rationale for believing that it won't encounter two symbols with the right name and namespace doesn't apply any more: this comment isn't describing code that deals only with sorted blocks any more. This is the code which can encounter duplicates. (It's odd to talk about "namespaces" (by which the comment means symtab.h's namespace_enum) and C++ in the same paragraph. It might be nice to clarify that while you're at it.)