This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PR exp/9103
Yes, it works in C with no problems at all.
Andre
On Wed, Mar 11, 2009 at 2:08 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Andre" == Andre Oliveira Loureiro do Baixo <andreolb@gmail.com> writes:
>
> Andre> The patch works correctly because the function inside the modified
> Andre> condition (val_print_string) scans the string using the size of each
> Andre> character of the string. This size is passed to the function using the
> Andre> parameter TYPE_LENGTH (elttype). Char * strings are printed by this
> Andre> function, the only difference is that wchar_t* strings didn't get
> Andre> inside the condition, and now they do.
>
> Yeah, but it isn't as useful as it could be, because it doesn't
> properly handle charset conversions. ?Also, I suspect it won't work in
> C, where wchar_t is a typedef.
>
> Try this patch instead:
>
> ? ?http://sourceware.org/ml/gdb-patches/2009-01/msg00533.html
>
> Tom
>