[PATCH 2/2] namespace support
Tom Tromey
tromey@redhat.com
Thu Jun 25 15:59:00 GMT 2009
>>>>> "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
More information about the Gdb-patches
mailing list