From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16552 invoked by alias); 12 Feb 2007 22:15:06 -0000 Received: (qmail 16521 invoked by uid 22791); 12 Feb 2007 22:15:06 -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, 12 Feb 2007 22:14:57 +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 1HGjRl-0001bY-92; Mon, 12 Feb 2007 17:14:53 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HGjRl-0007q7-08; Mon, 12 Feb 2007 17:14:53 -0500 Date: Mon, 12 Feb 2007 22:15:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [RFC] Signed/unsigned character arrays are not strings Message-ID: <20070212221452.GA29888@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , Eli Zaretskii , gdb-patches@sourceware.org References: <20070125015422.GA19113@host0.dyn.jankratochvil.net> <20070125113206.GA26448@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070125113206.GA26448@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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 X-SW-Source: 2007-02/txt/msg00173.txt.bz2 On Thu, Jan 25, 2007 at 12:32:06PM +0100, Jan Kratochvil wrote: > Attaching also "gdb-cvs-nosign-char.patch" for possible comments. > It starts printing > $1 = {65 'A', 0 '\0'} > finally as > $1 = {65, 0} > Not submitting it for commit review as it breaks the whole testsuite. > Still if anybody could update the testsuite it would be IMO a helpful patch. > Currently GDB displays the variants " 'X'" in many inappropriate cases. I must have forgotten about this message when the other patch went in. This would be a painful testsuite update... but I think it would be really nice. Does anyone else have an opinion? Before Jan's now committed patch, for strings: (gdb) p $mm0.v8_int8 $1 = "\000\000\000\000\000\000\000" After, i.e. CVS HEAD: (gdb) p $mm0.v8_int8 $2 = {0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0', 0 '\0'} That's better... but it really should be: $2 = {0, 0, 0, 0, 0, 0, 0, 0} This is int8_t, we know it's not a char, and when I'm trying to do math with an eight-element integer vector the chars are confusing. If this is a good idea, I'll take care of the testsuite updates for at least two platforms. That will cover most of it, and then we can fix the rest as they are noticed. -- Daniel Jacobowitz CodeSourcery