This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] namespace support
- 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: Thu, 25 Jun 2009 09:59:03 -0600
- Subject: Re: [PATCH 2/2] namespace support
- References: <4A16BBC7.3080608@redhat.com> <m3skies7hf.fsf@fleche.redhat.com> <4A428FA7.2040004@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> I have added a test case.
Thanks.
Tom> I suppose these arguments ought to be renamed, now that you have
Tom> renamed the struct fields...
Sami> Agreed. Is it cool if I add this to the struct field rename patch.
Sure, just remember to post the updated patch.
Sami> + int outer_len = (previous_component == 0 ? 0 : previous_component - 2);
Sami> + int inner_len = next_component;
Sami> + char *outer = alloca (outer_len + 1);
Sami> + char *inner = alloca (inner_len + 1);
Sami> +
Sami> + strncpy(outer, name, outer_len);
Sami> + strncpy(inner, name, inner_len);
Missing spaces before the open parens.
Also, I think you should just use memcpy here.
Sami> +int main(){
Sami> + using namespace A::B;
Sami> + return C::x;
Sami> +}
Sami> \ No newline at end of file
Add a newline...
Sami> +gdb_test "print C::x" "= 5"
Sami> \ No newline at end of file
... and here too.
Ok with those changes. Thanks.
Tom