This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/2] Perform a namespace lookup at every block level
- From: Tom Tromey <tromey at redhat dot com>
- To: Sami Wagiaalla <swagiaal at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Tue, 10 Nov 2009 15:23:16 -0700
- Subject: Re: [patch 1/2] Perform a namespace lookup at every block level
- References: <4A57512A.7090208@redhat.com> <20090710194949.GA2064@caradoc.them.org> <4A5B68A4.30006@redhat.com> <4A68B91D.2080206@redhat.com> <4A8B0FBA.4090501@redhat.com> <m3my3vjcu9.fsf@fleche.redhat.com> <4ADE21F9.7020801@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> I have added shadowing.exp to the patch which belongs to a future
Sami> patch but has some good tests, and it tests for the problem
Sami> pointed out by Daniel. I also added
Sami> namespace-multiple-imports.exp. Excuse the kfails; they will be
Sami> fixed by a future patch.
Thanks.
Sami> +static struct symbol *
Sami> +cp_lookup_symbol_in_namespace (const char *namespace,
Sami> + const char *name,
Sami> + const char *linkage_name,
Sami> + const struct block *block,
Sami> + const domain_enum domain)
Sami> +{
Sami> +
Extra blank line.
Sami> +static 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> + /* If the import destination is the current scope or one of its ancestors then
Does this line go past column 80? It looks like it.
Sami> + it is applicable. */
Sami> + if (strncmp (scope, current->import_dest, strlen (current->import_dest)) == 0)
>From my reading this doesn't exactly match the comment -- can
current->import_dest be an extension of scope? Like, if scope is "x"
and import_dest is "xyz"?
Sami> diff --git a/gdb/testsuite/gdb.cp/namespace-using.exp b/gdb/testsuite/gdb.cp/namespace-using.exp
Sami> + return -1;
No ";" here.
Otherwise this looks good.
Tom