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: [RFC 2/6] Avoid missing char before incomplete sequence in wchar_iterate.


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


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