This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] New function type_code_name.
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 14 Dec 2002 02:21:29 -0500
- Subject: Re: [RFA] New function type_code_name.
- References: <B87A936F-0D67-11D7-9BDD-00039396EEB8@apple.com>
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 <kdienes@apple.com>
>
> * 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