Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [patch] Add support for imported declaration and correct search order
Date: Thu, 25 Feb 2010 21:50:00 -0000	[thread overview]
Message-ID: <m3aauxouhh.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4B86DA17.5040200@redhat.com> (Sami Wagiaalla's message of "Thu, 	25 Feb 2010 15:14:15 -0500")

>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:

Sami> +  if (declaration != NULL)
Sami> +    retval->declaration = savestring (declaration, strlen (declaration));

... time to work on that memory leak bug :-)

Sami> +   and Y will be considered.  If SEARCH_PARENTS is false only the
Sami> import of Y
Sami>     is considered.  */

Thanks for adding that space :)

Sami> -static struct symbol *
Sami> +struct symbol *
Sami>  cp_lookup_symbol_imports (const char *scope,
Sami>                            const char *name,
Sami>                            const char *linkage_name,
Sami>                            const struct block *block,
Sami>                            const domain_enum domain,
Sami> +			  const int declaration_only,
Sami>                            const int search_parents)

The header comment should describe the new parameter.

Sami> +  if ( sym != NULL)

Extra space.

Sami> +      canonical_name = (char *) imported_name_prefix;

This cast is avoidable by introducing a new temporary for the alloca
result.  So, please change that.

Sami> +      if (language == language_cplus )

Extra space.

Sami> +        {
Sami> +          sym = cp_lookup_symbol_imports (scope, name, linkage_name,
Sami> block, domain, 1, 1);

This looks like it wraps.

I'm a little wary of changing lookup_symbol_aux_local to have
c++-specific code in it.  I suppose it isn't *too* bad in that we can
replace it with a language method if we really need to.

Tom


  reply	other threads:[~2010-02-25 21:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 20:17 Sami Wagiaalla
2010-02-25 21:50 ` Tom Tromey [this message]
2010-02-25 22:42 ` Jan Kratochvil
2010-02-26 20:11   ` Tom Tromey
2010-03-03 21:46     ` Sami Wagiaalla
2010-03-03 22:00       ` Tom Tromey
2010-03-08 16:39         ` Sami Wagiaalla
2010-03-08 18:58           ` Tom Tromey
2010-03-09 18:21             ` Sami Wagiaalla
2010-03-09 18:27               ` Tom Tromey
2010-03-23 20:31               ` Ulrich Weigand
2010-03-23 20:51                 ` Sami Wagiaalla
2010-03-23 21:35                   ` Ulrich Weigand
2010-03-29 14:48                     ` Sami Wagiaalla
2010-03-29 17:27                       ` Tom Tromey
2010-03-29 17:23                         ` Sami Wagiaalla

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=m3aauxouhh.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=swagiaal@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