From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12255 invoked by alias); 30 Dec 2010 04:43:28 -0000 Received: (qmail 12247 invoked by uid 22791); 30 Dec 2010 04:43:26 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Dec 2010 04:43:22 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 74D502BAC4D; Wed, 29 Dec 2010 23:43:20 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id q2MrGUUvMyf1; Wed, 29 Dec 2010 23:43:20 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 03E9E2BAC47; Wed, 29 Dec 2010 23:43:19 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 461D3145870; Thu, 30 Dec 2010 08:42:41 +0400 (RET) Date: Thu, 30 Dec 2010 10:59:00 -0000 From: Joel Brobecker To: Andreas Schwab Cc: gdb-patches@sourceware.org Subject: Re: [commit/Ada] print null array pointer as `0x0' rather than `(null)' Message-ID: <20101230044241.GI2396@adacore.com> References: <1293610216-9027-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-12/txt/msg00557.txt.bz2 > > gdb/ChangeLog: > > > > * ada-valprint.c (ada_val_print_1): Print null array pointers as > > `0x0' rather than `(null)'. Add assertion. > > Why not `null'? `null' would indeed be more Ada-like. But two reasons lead to use plain `0x0' for now: First, it is more consistent with the way we display all other pointer (we delegate the printing of a pointer to the common code with prints null pointers as 0x0). And the second reason is that the language parser in the debugger does not handle `null' yet. When GDB prints a value, I try to print it in a way that the user can copy-paste it in a expression that you can feed back to GDB. All the above is on my list of minor little improvements to make some rainy day, but there are so many more important things I want to get to, it's not likely to be done anytime soon. -- Joel