This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] New function type_code_name.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]