From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13434 invoked by alias); 27 Feb 2007 11:02:27 -0000 Received: (qmail 13422 invoked by uid 22791); 27 Feb 2007 11:02:25 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Feb 2007 11:02:12 +0000 Received: from kahikatea.snap.net.nz (189.60.255.123.dynamic.snap.net.nz [123.255.60.189]) by viper.snap.net.nz (Postfix) with ESMTP id 60E523D9E2A; Wed, 28 Feb 2007 00:02:08 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id E437A4F717; Wed, 28 Feb 2007 00:02:07 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17892.4014.160191.285423@kahikatea.snap.net.nz> Date: Tue, 27 Feb 2007 12:02:00 -0000 To: Daniel Jacobowitz Cc: Jan Kratochvil , mathieu lacage , gdb@sourceware.org Subject: Re: [RFC] Signed/unsigned character arrays are not strings In-Reply-To: <20070226004457.GA9926@caradoc.them.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> <20070226004457.GA9926@caradoc.them.org> X-Mailer: VM 7.19 under Emacs 22.0.94.2 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/msg00268.txt.bz2 > > 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'm not sure who you are addressing, but I don't think anyone is saying Emacs changes the overall situation. > I believe there are more > applications which use single byte arrays for numerical data than for > character data. That answers the question that we are really asking and justifies the patch. > We can document how to produce string output more > clearly in the manual, perhaps? Yes I think that is important, especially for an incompatible change. The following could also be updated in the manual: (gdb) print $xmm1 $1 = { v4_float = {0, 3.43859137e-038, 1.54142831e-044, 1.821688e-044}, v2_double = {9.92129282474342e-303, 2.7585945287983262e-313}, v16_int8 = "\000\000\000\000\3706;\001\v\000\000\000\r\000\000", v8_int16 = {0, 0, 14072, 315, 11, 0, 13, 0}, v4_int32 = {0, 20657912, 11, 13}, v2_int64 = {88725056443645952, 55834574859}, uint128 = 0x0000000d0000000b013b36f800000000 } -- Nick http://www.inet.net.nz/~nickrob