From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6074 invoked by alias); 14 Dec 2002 07:20:34 -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 6064 invoked from network); 14 Dec 2002 07:20:33 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 14 Dec 2002 07:20:33 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18N8Tf-0004J1-00 for ; Sat, 14 Dec 2002 03:20:56 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18N6c5-0006ta-00 for ; Sat, 14 Dec 2002 02:21:29 -0500 Date: Sat, 14 Dec 2002 02:32:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA] New function type_code_name. Message-ID: <20021214072129.GA26331@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00443.txt.bz2 On Wed, Dec 11, 2002 at 07:21:55PM -0500, Klee Dienes wrote: > This patch moves the type-printing code from recursive_dump_type() into > the new function type_code_name(). It's handy when one wants to use > the type code of a type in debugging or warning/error messages. > > 2002-12-11 Klee Dienes > > * gdbtypes.h (type_code_name): Add prototype. > * gdbtypes.c (type_code_name): New function. Returns a > constant string containing the ASCII name of the type code. > (recursive_dump_type): Use type_code_name. This is mostly OK. Would you add a comment by the enum for TYPE_CODE_* mentioning the list in type_code_name ()? Also, the argument to type_code_name should be an enum type_code, not an int. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer