From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20607 invoked by alias); 1 Oct 2013 01:19:15 -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 20597 invoked by uid 89); 1 Oct 2013 01:19:14 -0000 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, 01 Oct 2013 01:19:14 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com 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 r911J8v6020134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Sep 2013 21:19:09 -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 r911J7WS005669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 30 Sep 2013 21:19:08 -0400 Message-ID: <524A230B.5020304@redhat.com> Date: Tue, 01 Oct 2013 01:19: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 1/6] Fix display of tabulation character for mingw hosts. References: <002901cebaf2$35ec65a0$a1c530e0$@muller@ics-cnrs.unistra.fr> <002c01cebaf2$89798ea0$9c6cabe0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <002c01cebaf2$89798ea0$9c6cabe0$@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/msg00001.txt.bz2 On 09/26/2013 12:56 PM, Pierre Muller wrote: > 2013-09-26 Pierre Muller > > Fix display of tabulation character for mingw hosts. ^^^^^ Probably want to keep this a little formal and use "MinGW". > * gdb_wchar.h (gdb_iswprint): Declare as external function > if __MINGW32__ macro is set. > * mingw-hdep.c (gdb_iswprint): New function. I think this is a reasonable approach, but it will break builds that don't have a working/good iconv (amongst other reasons). I noticed this attempting to build --build=i686-unknown-linux --target=--host=i686-pc-mingw32: ../../gdb/gdb/mingw-hdep.c:88:5: error: 'isprint' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes] This happens because we end up in the very last section of gdb_wchar.h ("If we got here and have wchar_t support, we might be on a system with some problem. So, we just disable everything.") and that does: #define gdb_iswprint isprint > +/* Mingw specific version of iswprint to correct "MinGW-specific" > + difference concerning the tabulation character: > + msvcrt dll iswprint returns 1 for '\t' while > + UNIX uiswprint function returns 0 for '\t'. */ > + > +int gdb_iswprint (gdb_wint_t wc) ^^^^^^^^^^^^^^^^^ > +{ > + return wc == LCST ('\t') ? 0 : iswprint (wc); > +} The return type should be on a line by itself and the function name should start in column zero. Also please double-check that there is a newline between the closing brace of safe_strerror and the comment for this new function. [Maybe your patch got munged a bit?] Does this fix the output of many tests in the test suite already? If not, it would be really, really nice to have a test to check (and demonstrate) this quirk. Keith