From: Paul Hilfinger <HIlfinger@cs.berkeley.edu>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Paul Hilfinger <hilfingr@syracuse.mckusick.com>,
gdb-patches@sourceware.org
Subject: Re: [RFA] Rework symbol searches to move Ada-specific stuff to ada-lang.c.
Date: Thu, 07 Oct 2010 04:18:00 -0000 [thread overview]
Message-ID: <1286425093.1821.6.camel@syracuse.mckusick.com> (raw)
In-Reply-To: <20101006231525.GA12651@adacore.com>
On Wed, 2010-10-06 at 16:15 -0700, Joel Brobecker wrote:
> > (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?
>
I'm trying to be consistent. For most other static (file scope)
definitions, we have avoided to unnecessary prefix. In a better
language (:->), we'd be writing ada.foo to access exported symbols
from outside the Ada module, and just foo to access symbols defined
in the module.
> > +/* 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...
So I hear.
> > +/* 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.
>
Thanks for your comments.
Paul
prev parent reply other threads:[~2010-10-07 4:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 8:42 Paul Hilfinger
2010-10-06 22:52 ` Tom Tromey
2010-10-07 4:14 ` Paul Hilfinger
2010-10-07 17:53 ` Tom Tromey
2010-10-07 7:19 ` [commit] " Paul Hilfinger
2010-10-06 23:15 ` [RFA] " Joel Brobecker
2010-10-06 23:49 ` Doug Evans
2010-10-07 4:18 ` Paul Hilfinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286425093.1821.6.camel@syracuse.mckusick.com \
--to=hilfinger@cs.berkeley.edu \
--cc=Hilfinger@adacore.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=hilfingr@syracuse.mckusick.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).