Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Hilfinger <HIlfinger@cs.berkeley.edu>
To: Tom Tromey <tromey@redhat.com>
Cc: Hilfinger@adacore.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:14:00 -0000	[thread overview]
Message-ID: <1286424854.1821.2.camel@syracuse.mckusick.com> (raw)
In-Reply-To: <m3sk0j0wat.fsf@fleche.redhat.com>

On Wed, 2010-10-06 at 16:51 -0600, Tom Tromey wrote:
> >>>>> "Paul" == Paul Hilfinger <hilfingr@syracuse.mckusick.com> writes:
> 

> Paul> +dw2_map_matching_symbols (const char* name, domain_enum namespace,
> 
> "const char *name"
> 

OK.


> Paul>  /* Lookup a partial symbol.  */
> Paul> +static struct partial_symbol *match_partial_symbol (struct partial_symtab *,
> Paul> +						    int,
> Paul> +						    const char *, domain_enum,
> Paul> +						    int (*) (const char *,
> Paul> +							     const char *),
> Paul> +						    int (*) (const char *,
> Paul> +							     const char *));
> Paul> +
> Paul> +
> Paul>  static struct partial_symbol *lookup_partial_symbol (struct partial_symtab *,
> 
> This insertion separates a comment from the declaration it comments.
> 
> I think it is fine to just remove that comment, though.  It doesn't
> really add anything.
> 

OK


> Paul> +/* Look in PST for a symbol in DOMAIN whose name matches NAME.  Search
> Paul> +   the global block of PST if GLOBAL, and otherwise the static block.
> Paul> +   MATCH is the comparison operation that returns true iff MATCH (s,
> Paul> +   NAME), where s is a SYMBOL_SEARCH_NAME.  If ORDERED_COMPARE is
> Paul> +   non-null, the symbols in the block are assumed to be ordered
> Paul> +   according to it (allowing binary search).  It must be compatible
> Paul> +   with MATCH.  Returns the symbol, if found, and otherwise NULL.  */
> Paul> +static struct partial_symbol *
> Paul> +match_partial_symbol (struct partial_symtab *pst, int global,
> 
> We've recently started trying to enforce the rule about having a blank
> line between a function comment and the start of the function
> definition.

OK.


> Paul> +	    return (*top);
> 
> A few places have parens here, but they aren't needed.
> Just write "return *top;".

OK (BTW: That line was copied from the original).

> 
> Paul> +  /* Find global or static symbols in all tables that are in NAMESPACE 
> Paul> +     and for which MATCH (symbol name, NAME) == 0, passing each to 
> Paul> +     CALLBACK, reading in partial symbol symbol tables as needed.  Look
> Paul> +     through global symbols if GLOBAL and otherwise static symbols.  
> Paul> +     Passes NAME, NAMESPACE, and DATA to CALLBACK with each symbol
> Paul> +     found.  After each block is processed, passes NULL to CALLBACK.
> Paul> +     MATCH must be weaker than strcmp_iw in the sense that
> Paul> +     strcmp_iw(x,y) == 0 --> MATCH(x,y) == 0.  ORDERED_COMPARE, if
> Paul> +     non-null, must be an ordering relation compatible with strcmp_iw
> Paul> +     in the sense that  
> Paul> +            strcmp(x,y) == 0 --> ORDERED_COMPARE(x,y) == 0 
> Paul> +     and 
> Paul> +            strcmp(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0
> Paul> +     (allowing strcmp(x,y) < 0 while ORDERED_COMPARE(x, y) == 0). 
> Paul> +     CALLBACK returns 0 to indicate that the scan should continue, or
> Paul> +     non-zero to indicate that the scan should be terminated.  */
> 
> Thanks for being so thorough in this comment.

You're welcome.

Paul


  reply	other threads:[~2010-10-07  4:14 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 [this message]
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

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=1286424854.1821.2.camel@syracuse.mckusick.com \
    --to=hilfinger@cs.berkeley.edu \
    --cc=Hilfinger@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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