From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15983 invoked by alias); 26 Feb 2007 00:45:12 -0000 Received: (qmail 15975 invoked by uid 22791); 26 Feb 2007 00:45:12 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 26 Feb 2007 00:45:04 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HLTz8-00051b-3J; Sun, 25 Feb 2007 19:44:58 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HLTz7-0002fW-Pv; Sun, 25 Feb 2007 19:44:57 -0500 Date: Tue, 27 Feb 2007 09:29:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: mathieu lacage , Nick Roberts , gdb@sourceware.org Subject: Re: [RFC] Signed/unsigned character arrays are not strings Message-ID: <20070226004457.GA9926@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , mathieu lacage , Nick Roberts , gdb@sourceware.org References: <17887.62990.937672.281975@kahikatea.snap.net.nz> <20070224161315.GA27534@caradoc.them.org> <17888.39894.136355.447008@kahikatea.snap.net.nz> <1172390381.2584.18.camel@mathieu> <20070225195350.GA12811@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070225195350.GA12811@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00265.txt.bz2 On Sun, Feb 25, 2007 at 08:53:50PM +0100, Jan Kratochvil wrote: > On Sun, 25 Feb 2007 08:59:41 +0100, mathieu lacage wrote: > ... > > I don't know how useful that is to you but a lot of people (the first > > which comes to my mind is libxml2) decided to use "unsigned char *" to > > identify utf-8 encoded strings in C. > > Together with the attached RMS's response I became more inclined to revert this > change and provide only "$xmm"-specific fix instead (probably for the GDB > int8_t/uint8_t internal types). > > OK to submit the patch? RMS wrote: > Which GDB behavior is better is a matter of how often each one is > convenient and how often it causes trouble. I don't know enough to > have an opinion about that, but if neither one is clearly better > overall, it would be best to leave GDB the way it was. For myself, I think the new behavior is clearly better overall, and that relatively few packages rely on sign-specified character types for strings; that's why I approved Jan's patch. I even proposed an extension that I would find even more useful, to suppress the single-quoted characters for arrays of signed or unsigned byte variables. (No one's commented on that; I'll wait until we decide about this one first.) Do you think that Emacs's behavior - an important GNU application, but only one - changes the overall situation? I don't, and I am generally opposed to backing this change out. I believe there are more applications which use single byte arrays for numerical data than for character data. We can document how to produce string output more clearly in the manual, perhaps? -- Daniel Jacobowitz CodeSourcery