2009-03-10 Andre Oliveira Loureiro do Baixo * c-valprint.c (c_val_print): Added support for printing (wchar_t *) strings. Index: gdb/gdb/c-valprint.c =================================================================== --- gdb.orig/gdb/c-valprint.c 2009-03-10 17:08:57.000000000 -0300 +++ gdb/gdb/c-valprint.c 2009-03-10 17:38:09.000000000 -0300 @@ -226,11 +226,12 @@ if (options->addressprint) fputs_filtered (paddress (addr), stream); - /* For a pointer to a textual type, also print the string - pointed to, unless pointer is null. */ - /* FIXME: need to handle wchar_t here... */ + /* For a pointer to a textual type (including wchar_t), + also print the string pointed to, unless pointer is null. */ - if (textual_element_type (elttype, options->format) + if ((textual_element_type (elttype, options->format) + || (type->main_type->target_type->main_type->name + && !(strcmp ((type->main_type->target_type->main_type->name), "wchar_t")))) && addr != 0) { i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream,