From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [patch 1/2] Perform a namespace lookup at every block level
Date: Tue, 13 Oct 2009 19:47:00 -0000 [thread overview]
Message-ID: <m3my3vjcu9.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4A8B0FBA.4090501@redhat.com> (Sami Wagiaalla's message of "Tue, 18 Aug 2009 16:31:54 -0400")
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> Same as above, but I fixed a couple of issues with the previous patch.
Sami> The first issue is that even while we iterate over blocks the original
Sami> scope should be used. Secondly, the call to lookup_symbol_name space
Sami> in valops.c must also perform a per block search. The final issue is
Sami> recursive search which is discussed in part 2 of this patch.
Sorry about the delay on this. For best results, ping a pending patch
every week or two -- the lack of a response can mean either that
everybody is busy or that everybody somehow missed the posting entirely,
and there's no way to tell the difference.
Sami> @@ -265,8 +277,41 @@ cp_lookup_symbol_nonlocal (const char *name,
[...]
Sami> + if ( sym != NULL)
Extra space after the "(".
Sami> + return cp_lookup_symbol_namespace(scope, name, linkage_name, block, domain);
Missing a space before "(". There are several of these.
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 ( sym != NULL)
The extra space again :)
Sami> @@ -1304,13 +1304,14 @@ lookup_symbol_aux (const char *name, const char *linkage_name,
[...]
Sami> + /* C++ language specific lookup requires the lowest block level. */
Sami> + if (language != language_cplus)
Sami> + block = function_block;
I like to avoid special cases for a specific language in the generic
code. These make gdb more brittle over time; also they make it harder
to understand.
One alternative approach would be to pass `block' as an argument to the
la_lookup_symbol_nonlocal method. This would mean adding an ignored
parameter to most of the implementations of this method, but that is no
big deal, we've done that sort of thing before.
Sami> diff --git a/gdb/testsuite/gdb.cp/namespace-using.cc b/gdb/testsuite/gdb.cp/namespace-using.cc
I think this needs more tests. At the very least it should have a test
case for the bug Daniel pointed out upthread, but I think it would be
good to have tests for other confounding cases.
Tom
next prev parent reply other threads:[~2009-10-13 19:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-10 15:10 [patch] " Sami Wagiaalla
2009-07-10 20:16 ` Daniel Jacobowitz
2009-07-13 17:55 ` Sami Wagiaalla
2009-07-23 19:46 ` Sami Wagiaalla
2009-07-23 22:19 ` Sami Wagiaalla
2009-07-29 22:12 ` Tom Tromey
2009-08-18 20:34 ` [patch 1/2] " Sami Wagiaalla
2009-10-13 19:47 ` Tom Tromey [this message]
2009-10-20 20:50 ` Sami Wagiaalla
2009-11-10 22:23 ` Tom Tromey
2009-11-10 22:26 ` Tom Tromey
2009-11-16 15:32 ` Sami Wagiaalla
2009-11-16 19:16 ` Sami Wagiaalla
2009-11-24 19:06 ` Sami Wagiaalla
2009-12-21 21:44 ` Tom Tromey
2009-08-18 20:46 ` [patch 2/2] " Sami Wagiaalla
2009-09-04 16:57 ` Sami Wagiaalla
2009-10-13 20:22 ` Tom Tromey
2009-10-22 17:47 ` Sami Wagiaalla
2009-11-10 22:52 ` Tom Tromey
2009-11-16 17:55 ` Sami Wagiaalla
2009-11-24 19:12 ` Sami Wagiaalla
2009-12-21 21:55 ` Tom Tromey
2010-01-11 21:24 ` Sami Wagiaalla
2010-01-12 17:43 ` Tom Tromey
2010-01-14 16:47 ` Sami Wagiaalla
2010-01-14 20:18 ` Sami Wagiaalla
2010-01-15 18:06 ` Tom Tromey
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=m3my3vjcu9.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