forked from Imagelibrary/binutils-gdb
* NEWS: Update.
* c-typeprint.c (c_type_print_base): Handle print_method and print_typedefs flags. * gdbcmd.h (setprinttypelist, showprinttypelist): Declare. * python/py-type.c (typy_str): Use LA_PRINT_TYPE and raw options. * typeprint.c (type_print_raw_options, default_ptype_flags): Update for new field.s (whatis_exp): Parse flags. Use LA_PRINT_TYPE. (setprinttypelist, showprinttypelist, print_methods, print_typedefs): New globals. (set_print_type, show_print_type, set_print_type_methods, show_print_type_methods, set_print_type_typedefs, show_print_type_typedefs): New functions. (_initialize_typeprint): Update documentation. Add "print type methods" and "print type typedefs" parameters. * typeprint.h (struct type_print_options) <print_methods, print_typedefs>: New fields. doc * gdb.texinfo (Symbols): Document "set print type methods", "set print type typedefs", and flags to ptype and whatis.
This commit is contained in:
@@ -970,6 +970,8 @@ c_type_print_base (struct type *type, struct ui_file *stream,
|
||||
between them. Make sure to count only method that we
|
||||
will display; artificial methods will be hidden. */
|
||||
len = TYPE_NFN_FIELDS (type);
|
||||
if (!flags->print_methods)
|
||||
len = 0;
|
||||
real_len = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
@@ -1136,7 +1138,7 @@ c_type_print_base (struct type *type, struct ui_file *stream,
|
||||
|
||||
/* Print typedefs defined in this class. */
|
||||
|
||||
if (TYPE_TYPEDEF_FIELD_COUNT (type) != 0)
|
||||
if (TYPE_TYPEDEF_FIELD_COUNT (type) != 0 && flags->print_typedefs)
|
||||
{
|
||||
if (TYPE_NFIELDS (type) != 0 || TYPE_NFN_FIELDS (type) != 0)
|
||||
fprintf_filtered (stream, "\n");
|
||||
|
||||
Reference in New Issue
Block a user