From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/2] namespace support
Date: Fri, 05 Jun 2009 00:27:00 -0000 [thread overview]
Message-ID: <m3y6s7v83b.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4A16BAB5.80602@redhat.com> (Sami Wagiaalla's message of "Fri\, 22 May 2009 10\:46\:13 -0400")
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> Currently imports statements are stored in the nearest static
Sami> block. Also, these import statements only correspond to the
Sami> implicit importing of annonymous namespaces.
This looks pretty reasonable to me.
A few nits and such...
Sami> +/* This returns the using directives list associated to BLOCK, if
Sami> + any. Each BLOCK_NAMESPACE()->USING already contains all the namespaces
Sami> + imported at that code point - even those from its parent blocks. */
I think the caps on "USING" here are weird.
Maybe just:
The result contains all the [...]
Sami> +/* using directives local to lexical context */
Comments should in general be sentences -- starting with a capital
letter and ending with a period and two spaces.
Here I would probably write:
/* "using" directives local to lexical context. */
... avoiding the capital since "using" is a keyword.
Sami> +EXTERN struct using_direct *using_directives;
Eww, buildsym is full of globals. Not your problem :-), but yet
another thing that would be nice to clean up.
Sami> + /* Pending using directives at the time we entered */
Likewise about the period and spaces.
Sami> - using_list = cp_add_using (name, inner_length, outer_length,
Sami> - using_list);
Sami> + using_directives = cp_add_using (name, inner_length, outer_length,
Sami> + using_directives);
Looks like a formatting change; the old code was indented correctly.
Sami> +static void
Sami> +read_import_statement (struct die_info *die, struct dwarf2_cu *cu)
[...]
Sami> + if (imported_name == NULL)
Sami> + {
Sami> + /* C++ imports from std:: DW_TAG_base_type with no DW_AT_name - why? */
It would be nice to understand this before the patch goes in.
Sami> + /* FIXME: dwarf2_name (die); for the local name after import. */
It would also be nice if we could not add new FIXMEs.
Or is that handled in a later patch?
Sami> + using_directives = cp_add_using (imported_name, strlen (imported_name), 0,
Sami> + using_directives);
Sami> +}
I didn't look -- but are there other buildsym globals which are
actively updated by the dwarf reader like this? I'm wondering whether
this is something that should be hidden inside a call, like a new
wrapper for cp_add_using.
This is not a big deal.
Tom
next prev parent reply other threads:[~2009-06-05 0:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 14:48 Sami Wagiaalla
2009-06-02 15:13 ` Sami Wagiaalla
2009-06-05 0:27 ` Tom Tromey [this message]
2009-06-19 19:43 ` Sami Wagiaalla
2009-06-19 20:15 ` Sami Wagiaalla
2009-06-19 21:33 ` Tom Tromey
2009-06-19 21:44 ` 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=m3y6s7v83b.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