From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19926 invoked by alias); 5 Nov 2002 04:02:10 -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 19918 invoked from network); 5 Nov 2002 04:02:10 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by sources.redhat.com with SMTP; 5 Nov 2002 04:02:10 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id gA5429I06624 for ; Mon, 4 Nov 2002 20:02:09 -0800 (PST) Received: from scv2.apple.com (scv2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Mon, 4 Nov 2002 20:02:09 -0800 Received: from platinum.localnet (vpn-scv-x3-17.apple.com [17.219.194.17]) by scv2.apple.com (8.11.3/8.11.3) with ESMTP id gA5423i09024; Mon, 4 Nov 2002 20:02:03 -0800 (PST) Date: Mon, 04 Nov 2002 20:02:00 -0000 Subject: Re: [PATCH] Print vector registers in natural format, not hex Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com To: Elena Zannoni From: Klee Dienes In-Reply-To: <15792.38707.400671.968851@localhost.redhat.com> Message-Id: <5769348C-F073-11D6-8361-00039396EEB8@apple.com> Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00044.txt.bz2 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