From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28404 invoked by alias); 5 Nov 2002 04:34:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28397 invoked from network); 5 Nov 2002 04:34:42 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 5 Nov 2002 04:34:42 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 188wLe-0006A2-00; Mon, 04 Nov 2002 23:33:58 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 188vQz-0000S2-00; Mon, 04 Nov 2002 23:35:25 -0500 Date: Mon, 04 Nov 2002 20:34:00 -0000 From: Daniel Jacobowitz To: Klee Dienes Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Print vector registers in natural format, not hex Message-ID: <20021105043522.GA1590@nevyn.them.org> Mail-Followup-To: Klee Dienes , Elena Zannoni , gdb-patches@sources.redhat.com References: <15792.38707.400671.968851@localhost.redhat.com> <5769348C-F073-11D6-8361-00039396EEB8@apple.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5769348C-F073-11D6-8361-00039396EEB8@apple.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-11/txt/msg00045.txt.bz2 I absolutely agree. I ran into this a couple of days ago and wasted ten minutes figuring out how big my array was again, anyway... On Mon, Nov 04, 2002 at 11:02:03PM -0500, Klee Dienes wrote: > I think it's definitely a misfeature. It's would be different if GDB > were skipping all the trailing nulls, and not just the final null ... > but either way, I think it's the wrong behavior. An array is an array, > not a string, and printing: > > $1 = "abcd\000\000\000\000\000" > > instead of > > $1 = "abcd\000\000\000\000\000\000" > > for 'char buf[10] = "hello"' > > just seems much more confusing than useful. > > On Friday, October 18, 2002, at 07:20 PM, Elena Zannoni wrote: > > > >And you haven't noticed this comment in the testfile, I take it :-) I > >discovered this while writing the vector support, but didn't fix it. I > >don't know that it actually needs to be fixed. It's a feature, not a > >bug, one could argue. > > > ># Note: in LE case, the char array is printed WITHOUT the last > >character. > ># Gdb treats the terminating null char in the array like the > >terminating > ># null char in a string and doesn't print it. This is not a failure, > >but > ># the way gdb works. > > > >Elena > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer