Fix display of tabulation character for mingw hosts.
Pierre proposed this patch
https://sourceware.org/ml/gdb-patches/2013-10/msg00011.html and
Tom gave a suggestion that it's better to do check \t in print_wchar
<https://sourceware.org/ml/gdb-patches/2013-11/msg00148.html>
However, I don't see the follow-up to this discussion.
We encounter two fails in printcmds.exp on mingw host, and Pierre's
patch fixes them. I pick it up, update a little per Tom's
comments, and post it here for review. This patch fixes these fails
below on mingw32 host.
FAIL: gdb.base/charset.exp: print string in ASCII
FAIL: gdb.base/charset.exp: try printing '\t' in ASCII
FAIL: gdb.base/charset.exp: print string in ISO-8859-1
FAIL: gdb.base/charset.exp: try printing '\t' in ISO-8859-1
FAIL: gdb.base/charset.exp: print string in UTF-32
FAIL: gdb.base/charset.exp: try printing '\t' in UTF-32
FAIL: gdb.base/printcmds.exp: p ctable1[9]
FAIL: gdb.base/printcmds.exp: p &ctable1[1*8]
Also regression tested on x86_64-linux. Is it OK?
gdb:
2014-05-16 Pierre Muller <muller@sourceware.org>
Yao Qi <yao@codesourcery.com>
* valprint.c (print_wchar): Move the code on checking whether
W is a printable wide char to the default branch of switch
statement below. Call wchar_printable instead of gdb_iswprint.