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 2/2] namespace support
Date: Fri, 05 Jun 2009 21:20:00 -0000	[thread overview]
Message-ID: <m3skies7hf.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4A16BBC7.3080608@redhat.com> (Sami Wagiaalla's message of "Fri\, 22 May 2009 10\:50\:47 -0400")

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

Sami> Import data structure ( struct using_direct) is limited to
Sami> representing import statements where the destination is a parent
Sami> of the source (true for anonymous namespaces). This patch removes
Sami> this limitation, allowing each import to represent independent
Sami> import source and destination.

Thanks.

Aside from some nits this looks pretty good.

Is this just a "technical" patch?  Or does it enable some new
user-visible functionality?  The former is fine, but if it is the
latter, how about a test case?

Sami> +	* dwarf2read.c (read_import_statement): Properly set import location
Sami> +	and destenation.

Typo, should be "destination".

Sami> +	* cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
Sami> +	inner, char* outer arguments. Updated callers.

I suppose these arguments ought to be renamed, now that you have
renamed the struct fields...

Sami> +	      char outer[outer_len+1];

We can't use VLAs in gdb.  Instead, use alloca.

Also, just FYI, the GNU coding style requires spaces around that "+".

Sami> +	      strncpy(outer, name, outer_len);

Space before open paren.

Sami> -	      cp_add_using_directive (name,
Sami> -				      previous_component == 0
Sami> -				      ? 0 : previous_component - 2,
Sami> -				      next_component);
Sami> +	      cp_add_using_directive (outer, name);

Do we know for sure that NAME is \0-terminated here?
It needs to be due to the change to cp_add_using_directive.

Sami> +  /* Figure out where the statement is being imported to */

Comment should be a sentence.

Sami> +  /*
Sami> +   Figure out what the scope of the imported die is and prepend it
Sami> +   to the name of the imported die
Sami> +   */

Ditto; also the formatting is wrong: no newline after the first * or
before the last *.

Sami> +  if(strlen (imported_name_prefix) > 0){

Wrong brace placement.

Tom


  reply	other threads:[~2009-06-05 21:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 14:52 Sami Wagiaalla
2009-06-05 21:20 ` Tom Tromey [this message]
2009-06-24 20:43   ` Sami Wagiaalla
2009-06-25 15:59     ` 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=m3skies7hf.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