From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22547 invoked by alias); 26 Sep 2013 20:04:04 -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 22538 invoked by uid 89); 26 Sep 2013 20:04:04 -0000 Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.214) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2013 20:04:04 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT,SPAM_SUBJECT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id D66CC1A1118 for ; Thu, 26 Sep 2013 22:04:00 +0200 (CEST) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id C633C1A1124 for ; Thu, 26 Sep 2013 22:04:00 +0200 (CEST) Received: from md13.u-strasbg.fr (md13.u-strasbg.fr [130.79.200.248]) by mr4.u-strasbg.fr (Postfix) with ESMTP id 964311A111C for ; Thu, 26 Sep 2013 22:03:59 +0200 (CEST) Received: from ms17.u-strasbg.fr (ms17.u-strasbg.fr [130.79.204.117]) by md13.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r8QK3xeR007711 for ; Thu, 26 Sep 2013 22:03:59 +0200 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (Authenticated sender: mullerp) by ms17.u-strasbg.fr (Postfix) with ESMTPSA id E73981FD95 for ; Thu, 26 Sep 2013 22:03:57 +0200 (CEST) From: "Pierre Muller" To: "'gdb-patches'" References: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> Subject: [RFC 5/6] Handle "set print sevenbit-strings on" in print_wchar Date: Thu, 26 Sep 2013 20:04:00 -0000 Message-ID: <003801cebaf3$888993e0$999cbba0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00942.txt.bz2 When "set print sevenbit-strings on" is used, all characters above 127 should be displayed as escapes. This patch does just that. Pierre Muller GDB pascal language maintainer 2013-09-26 Pierre Muller valprint.c (print_wchar): Honor sevenbit_strings value. --- gdb/valprint.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gdb/valprint.c b/gdb/valprint.c index 0f6d65e..912352c 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1926,9 +1926,10 @@ print_wchar (gdb_wint_t w, const gdb_byte *orig, int need_escape = *need_escapep; *need_escapep = 0; - if (gdb_iswprint (w) && (!need_escape || (!gdb_iswdigit (w) - && w != LCST ('8') - && w != LCST ('9')))) + if (gdb_iswprint (w) + && (!sevenbit_strings || (w > 0 && w < 0x7f)) + && (!need_escape || (!gdb_iswdigit (w) + && w != LCST ('8') && w != LCST ('9')))) { gdb_wchar_t wchar = w; -- 1.7.9