From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25041 invoked by alias); 18 Jun 2002 22:26:04 -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 24984 invoked from network); 18 Jun 2002 22:25:57 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 18 Jun 2002 22:25:57 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BC5723D78; Tue, 18 Jun 2002 18:25:57 -0400 (EDT) Message-ID: <3D0FB375.7060704@cygnus.com> Date: Tue, 18 Jun 2002 15:26:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: ``set mips abi'' References: <20020613185151.GA352@nevyn.them.org> <3D0FA494.3040706@cygnus.com> <20020618213416.GA2881@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00346.txt.bz2 > > If we didn't already have and need the enum all over that file, I'd > agree with you. I don't see a point in all the extra globals. But > hey, I don't mind. Yes, I noticed that. I was thinking of just changing the global_...() function to be: if (mips_abi == mips_abi_o32) return MIPS_ABI_O32; else if (...) .. else internal error() so that the rest didn't need to be changed. It is how it has been done in the past. >> (Having an enum mechanism that bound a number to a name would be nice). > You can do it very easily with designated initializers, but they are > not adequately portable. You can do it very easily building the array > at runtime but why bother? Keeping two lists in sync is not the most > complicated thing in the world. (what's a designated initializer?) True, if there is a way to do it reliably though. Andrew