From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31118 invoked by alias); 14 Jul 2004 19:55:05 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31106 invoked from network); 14 Jul 2004 19:55:03 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Jul 2004 19:55:03 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6EJt3e3005321 for ; Wed, 14 Jul 2004 15:55:03 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6EJt3010000; Wed, 14 Jul 2004 15:55:03 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4F0DC2B9D; Wed, 14 Jul 2004 15:54:50 -0400 (EDT) Message-ID: <40F58F8A.5060304@gnu.org> Date: Wed, 14 Jul 2004 20:00:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Paul Hilfinger Cc: Joel Brobecker , gdb@sources.redhat.com Subject: Re: Ada's formats References: <200407090156.i691uerY026306@tully.CS.Berkeley.EDU> In-Reply-To: <200407090156.i691uerY026306@tully.CS.Berkeley.EDU> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00150.txt.bz2 > Andrew, > > >>> #if 0 >>> {"8#%lo#", "8#", "o", "#"}, /* Octal format info */ >>> {"%ld", "", "d", ""}, /* Decimal format info */ >>> {"16#%lx#", "16#", "x", "#"}, /* Hex format info */ >>> #else >>> /* Copied from c-lang.c. */ >>> {"0%lo", "0", "o", ""}, /* Octal format info */ >>> {"%ld", "", "d", ""}, /* Decimal format info */ >>> {"0x%lx", "0x", "x", ""}, /* Hex format info */ >>> #endif > > > The problem reflected by the conditionalization here was aesthetic > internal disagreement as to whether we wanted Ada's literal format for > hex numbers (e.g., 16#deadbeef#) or C's. GDB sometimes refers to the > language vector and sometimes does not, so that if our purpose was to > be kind to the hypothetical GNAT user (i.e., one who believes that "C" > is just the third letter of the alphabet), we would not only fail, but > perhaps sow further confusion. The two options remain in the source > code, however, to indicate the embarrassing fact that we are not of > one mind on the issue. > If on the other hand you are asking whether I think that (in general), > it would improve the abstraction to "functionalize" this part of the > language vector, my answer is a firm ... could be. How about this: shall gdb support the feature of language specific numeric formatting? If yes, we'll need to make this work. The current code isn't sufficient so a change such as I suggest will be needed. If no, we should delete all that broken code - it isn't sufficient to handle the Ada case. Here ``could be'' isn't an option :-) Andrew