This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Rework symbol searches to move Ada-specific stuff to ada-lang.c.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Paul Hilfinger <hilfingr at syracuse dot mckusick dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 6 Oct 2010 16:15:25 -0700
- Subject: Re: [RFA] Rework symbol searches to move Ada-specific stuff to ada-lang.c.
- References: <201010050842.o958gDNO002818@syracuse.mckusick.com>
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