This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] namespace support


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]