This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 2/6] Avoid missing char before incomplete sequence in wchar_iterate.
- From: Keith Seitz <keiths at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'gdb-patches'" <gdb-patches at sourceware dot org>
- Date: Tue, 22 Oct 2013 11:24:53 -0700
- Subject: Re: [RFC 2/6] Avoid missing char before incomplete sequence in wchar_iterate.
- Authentication-results: sourceware.org; auth=none
- References: <002901cebaf2$35ec65a0$a1c530e0$ at muller@ics-cnrs.unistra.fr> <002f01cebaf2$aac80410$00580c30$ at muller@ics-cnrs.unistra.fr> <524A2316 dot 8020607 at redhat dot com> <001201cebea4$700a4bc0$501ee340$ at muller@ics-cnrs.unistra.fr>
On 10/01/2013 05:47 AM, Pierre Muller wrote:
Here is a test, maybe this is overkill...
There is no such thing as overkill in testing. :-)
On a linux machine with charset set to UTF-8,
I do get failures, but not all are related to the fix in the patch...
Some are due to the fact that <incomplete sequence is printed out..
Nevertheless, incomplete_LSE, incomplete_RSE and incomplete_SSE
do show one missing char.
FAIL: gdb.base/printcmds.exp: print incomplete_LLE
FAIL: gdb.base/printcmds.exp: print incomplete_RLE
FAIL: gdb.base/printcmds.exp: print incomplete_SLE
FAIL: gdb.base/printcmds.exp: print incomplete_LRE
FAIL: gdb.base/printcmds.exp: print incomplete_RRE
FAIL: gdb.base/printcmds.exp: print incomplete_SRE
FAIL: gdb.base/printcmds.exp: print incomplete_LSE
FAIL: gdb.base/printcmds.exp: print incomplete_RSE
FAIL: gdb.base/printcmds.exp: print incomplete_SSE
I'm not seeing these fail on my box, which defaults to UTF-8.
But there are two minor problems. It looks like py-prettyprint.exp needs
updating. That test prints a string with an invalid sequence much like
what you're trying to fix:
print estring2
$9 = "embedded x", <incomplete sequence \302>
(gdb) FAIL: gdb.python/py-prettyprint.exp: print estring2
In this case, the 'x' is "new" to the output. [It does this twice, in
both tests named "print estring2". Ick. This file has duplicate test names.]
PS: One missing thing is the re-indentation of the exp
file for the additional foreach loop...
But using vim in visual mode and '>' command
added directly 8 spaces, instead of 4...
Doing all that by hand is really frustrating...
Should .exp files be treated differently from other tcl files?
Not as far as I know... At least, I've never done anything special with
indentation, but I use emacs, and that picks up gdb/.dir-locals.el,
which specifies 4-space tabs for Tcl:
(tcl-mode . ((tcl-indent-level . 4)
(tcl-continued-indent-level . 4)
(indent-tabs-mode . t)))
Keith