From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27744 invoked by alias); 22 Oct 2013 18:25:35 -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 27730 invoked by uid 89); 22 Oct 2013 18:25:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Oct 2013 18:25:33 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9MIPT5i031250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 22 Oct 2013 14:25:29 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9MIPSRh013141 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Oct 2013 14:25:29 -0400 Message-ID: <5266C318.2020100@redhat.com> Date: Tue, 22 Oct 2013 18:25:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Pierre Muller CC: "'gdb-patches'" Subject: Re: [RFC 5/6] Handle "set print sevenbit-strings on" in print_wchar References: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> <003801cebaf3$888993e0$999cbba0$@muller@ics-cnrs.unistra.fr> <524A231F.1050101@redhat.com> <000601cebea9$6c4bf1f0$44e3d5d0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <000601cebea9$6c4bf1f0$44e3d5d0$@muller@ics-cnrs.unistra.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00701.txt.bz2 On 10/01/2013 06:23 AM, Pierre Muller wrote: > ChangeLog entry: > > 2013-10-01 Pierre Muller > > * valprint.c (print_wchar): Print all char above seven-bit > as octal or hexadecimal if SEVENBIT_STRINGS is non-zero. > > testsuite ChangeLog: > > 2013-10-01 Pierre Muller > gdb.base/charset.exp: Add test to print char \242 in charset CP1252 > with or without "set print sevenbit-strings on". Thank you for the test. This is exactly the kind of thing that is needed. There is one little problem with this, though. As is, the first test, "print \"\\242\"" will fail on linux (at least it does for me). This is because gdb_init (in testsuite/lib/gdb.exp) overrides the environment's locale settings. So we should probably force en_US.UTF-8 and restart gdb before running your new tests: setenv LANG en_US.UTF-8 setenv LC_ALL en_US.UTF-8 setenv LC_TYPE en_US.UTF-8 clean_restart $testfile gdb_test "set charset CP1252" ... With this, the test will pass. Keith