From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6468 invoked by alias); 8 Nov 2013 11:04:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6455 invoked by uid 89); 8 Nov 2013 11:04:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.5 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT,RDNS_NONE,SPAM_SUBJECT,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from Unknown (HELO mailhost.u-strasbg.fr) (130.79.222.215) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Nov 2013 11:04:35 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id A2EF6A02D4; Fri, 8 Nov 2013 12:04:26 +0100 (CET) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id 94138A0301; Fri, 8 Nov 2013 12:04:26 +0100 (CET) Received: from md14.u-strasbg.fr (md14.u-strasbg.fr [130.79.200.249]) by mr5.u-strasbg.fr (Postfix) with ESMTP id 4EABEA02D4; Fri, 8 Nov 2013 12:04:23 +0100 (CET) Received: from ms11.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md14.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id rA8B4Mnq007643 ; Fri, 8 Nov 2013 12:04:23 +0100 Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (Authenticated sender: mullerp) by ms11.u-strasbg.fr (Postfix) with ESMTPSA id 2D74E1FD7B; Fri, 8 Nov 2013 12:04:20 +0100 (CET) From: "Pierre Muller" To: "'Tom Tromey'" Cc: "'Keith Seitz'" , "'gdb-patches'" References: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> <002f01cebaf2$aac80410$00580c30$@muller@ics-cnrs.unistra.fr> <524A2316.8020607@redhat.com> <33559.6669152894$1380631692@news.gmane.org> <87y5511afe.fsf@fleche.redhat.com> In-Reply-To: <87y5511afe.fsf@fleche.redhat.com> Subject: RE: [RFC 2/6] Avoid missing char before incomplete sequence in wchar_iterate. Date: Fri, 08 Nov 2013 11:21:00 -0000 Message-ID: <007201cedc72$46a78810$d3f69830$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-11/txt/msg00227.txt.bz2 Hi Tom, > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Tom Tromey > Envoy=E9=A0: mercredi 6 novembre 2013 22:35 > =C0=A0: Pierre Muller > Cc=A0: 'Keith Seitz'; 'gdb-patches' > Objet=A0: Re: [RFC 2/6] Avoid missing char before incomplete sequence in > wchar_iterate. >=20 > >>>>> "Pierre" =3D=3D Pierre Muller > writes: >=20 > Pierre> 2013-10-01 Pierre Muller > Pierre> charset.c (wchar_iterate): Also handle converted characters > Pierre> when EINVAL is returned by iconv call. > Pierre> 2013-10-01 Pierre Muller > Pierre> * gdb.base/printcmds.c: Add strings with incomplete > sequence. > Pierre> * gdb.base/printcmds.exp (test_repeat_bytes): Check output > of > Pierre> strings containing incomplete sequence. >=20 > This looks good to me, but Keith had reported some additional > regressions from this patch in gdb.python. > Do you see those? I had big troubles getting a gdb with mingw32 python library included (still had to tweak the configure script to convert Windows style paths to cygwin style..) Anyhow, I did see indeed two failures that seem to be related to that change:=20 "print estring" and "print estring2" The second is easily fixed by adding the 'x' char as Keith suggested, but the first is also a problem of different starting charset for mingw versus linux. The solution for that one probably is as Keith suggested to=20 force the value of the charset by setting the encoding explicitly before. Moving the line gdb_test_no_output "python pp_ls_encoding =3D 'UTF-8'" before "print estring" test seems to remove the failure, but shouldn't these be invalid sequences for UFT-8? Pierre diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp index adbe88d..76e7ad2 100644 --- a/gdb/testsuite/gdb.python/py-prettyprint.exp +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp @@ -91,7 +91,7 @@ proc run_lang_tests {exefile lang} { gdb_test "print estring" " =3D \"embedded x\\\\201\\\\202\\\\203\\\\204\"" gdb_test_no_output "python pp_ls_encoding =3D 'UTF-8'" - gdb_test "print estring2" "\"embedded \", " + gdb_test "print estring2" "\"embedded x\", " gdb_test_no_output "set python print-stack full" gdb_test "print hint_error" "Exception: hint failed\r\nhint_error_val"