From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12292 invoked by alias); 6 Oct 2010 23:15:35 -0000 Received: (qmail 12278 invoked by uid 22791); 6 Oct 2010 23:15:34 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN 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 23:15:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8C0B12BAC37; Wed, 6 Oct 2010 19:15:28 -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 j73Nvizy8sEe; Wed, 6 Oct 2010 19:15:28 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EB9582BAC14; Wed, 6 Oct 2010 19:15:27 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 1EDB0F5895; Wed, 6 Oct 2010 16:15:25 -0700 (PDT) Date: Wed, 06 Oct 2010 23:15:00 -0000 From: Joel Brobecker To: Paul Hilfinger Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Rework symbol searches to move Ada-specific stuff to ada-lang.c. Message-ID: <20101006231525.GA12651@adacore.com> References: <201010050842.o958gDNO002818@syracuse.mckusick.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010050842.o958gDNO002818@syracuse.mckusick.com> 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/msg00097.txt.bz2 FWIW, Paul actually knows a lot more about the ada-* code since he wrote most of it. So I do not feel that it needs to be approved by me before he can commit Ada-related changes. But a second pair of eyes never hurts, so... > (ada_match_name): Rename to match_name (we should avoid prefixing static > symbols with "ada_"). I don't oppose this change, but I really don't understand why that's something we should avoid. If it's something Ada-specific, why not saying so in the function name? > +/* A callback for add_matching_symbols that adds SYM, found in BLOCK, > + to a list of symbols. DATA0 is a pointer to a struct match_data * > + containing the obstack that collects the symbol list, the file that SYM > + must come from, a flag indicating whether a non-argument symbol has > + been found in the current block, and the last argument symbol > + passed in SYM within the current block (if any). When SYM is null, > + marking the end of a block, the argument symbol is added if no > + other has been found. */ > +static int > +aux_add_nonlocal_symbols (struct block *block, struct symbol *sym, void *data0) A formatting nit: Doug would like us to add an empty line after the comment that documents a function... > +/* Compare STRING1 to STRING2, with results as for strcmp. > + Compatible with strcmp_iw in that strcmp_iw (STRING1, STRING2) <= 0 > + implies compare_names (STRING1, STRING2) (they may differ as to > + what symbols compare equal). */ > +static int > +compare_names (const char *string1, const char *string2) Same here. > +/* Returns 0 iff symbol name SYM_NAME matches SEARCH_NAME, apart from > + informational suffix. */ > static int > full_match (const char* sym_name, const char* search_name) Same here. -- Joel