123 slot = htab_find_slot (table->
table, tdef, INSERT);
159 slot = htab_find_slot (table->
table, tf, INSERT);
175 obstack_init (&result->
storage);
187 htab_delete (table->
table);
188 obstack_free (&table->
storage, NULL);
214 htab_t new_table = nt;
217 new_slot = htab_find_slot (new_table, *slot, INSERT);
218 if (*new_slot == NULL)
349 error (
_(
"Language not supported."));
363 LA_PRINT_TYPE (type, varstring, stream, show, 0, &default_ptype_flags);
404 struct type *real_type = NULL;
420 for (++exp; *exp && !isspace (*exp); ++exp)
440 error (
_(
"unrecognized flag '%c'"), *exp);
445 if (!*exp && !seen_one)
446 error (
_(
"flag expected"));
448 error (
_(
"expected space after format"));
534 for (i = 0; i <
len; i++)
583 error (
_(
"internal error: unhandled type in print_type_scalar"));
587 error (
_(
"Invalid type code in symbol table."));
604 if (type_name != NULL)
637 "\"set print type\" must be followed by the name of a subcommand.\n");
685 Print definition of type TYPE.\n\
686 Usage: ptype[/FLAGS] TYPE | EXPRESSION\n\
687 Argument may be any type (for example a type name defined by typedef,\n\
688 or \"struct STRUCT-TAG\" or \"class CLASS-NAME\" or \"union UNION-TAG\"\n\
689 or \"enum ENUM-TAG\") or an expression.\n\
690 The selected stack frame's lexical context is used to look up the name.\n\
691 Contrary to \"whatis\", \"ptype\" always unrolls any typedefs.\n\
693 Available FLAGS are:\n\
694 /r print in \"raw\" form; do not substitute typedefs\n\
695 /m do not print methods defined in a class\n\
696 /M print methods defined in a class\n\
697 /t do not print typedefs defined in a class\n\
698 /T print typedefs defined in a class"));
702 _(
"Print data type of expression EXP.\n\
703 Only one level of typedefs is unrolled. See also \"ptype\"."));
707 _(
"Generic command for showing type-printing settings."),
710 _(
"Generic command for setting how types print."),
711 &setprinttypelist,
"show print type ", 0, &
setprintlist);
715 Set printing of methods defined in classes."),
_(
"\
716 Show printing of methods defined in classes."), NULL,
719 &setprinttypelist, &showprinttypelist);
722 Set printing of typedefs defined in classes."),
_(
"\
723 Show printing of typedefs defined in classes."), NULL,
726 &setprinttypelist, &showprinttypelist);
union exp_element elts[1]
struct cmd_list_element * add_prefix_cmd(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc, struct cmd_list_element **prefixlist, const char *prefixname, int allow_unknown, struct cmd_list_element **list)
static void whatis_exp(char *, int)
#define LA_PRINT_TYPEDEF(type, new_symbol, stream)
static const char * find_global_typedef(const struct type_print_options *flags, struct type *t)
static void set_print_type_typedefs(char *args, int from_tty, struct cmd_list_element *c)
#define TYPE_FIELD_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
struct ext_lang_type_printers * start_ext_lang_type_printers(void)
char * ui_file_xstrdup(struct ui_file *file, long *length)
struct ui_file * gdb_stdout
static int copy_typedef_hash_element(void **slot, void *nt)
#define SYMBOL_CLASS(symbol)
void _initialize_typeprint(void)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
static void show_print_type_typedefs(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
char * skip_spaces(char *chp)
struct typedef_hash_table * copy_typedef_hash(struct typedef_hash_table *table)
struct ext_lang_type_printers * global_printers
#define TYPE_FIELD_ENUMVAL(thistype, n)
void printf_filtered(const char *format,...)
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
#define TYPE_N_TEMPLATE_ARGUMENTS(thistype)
void null_cleanup(void *arg)
static void do_free_typedef_hash(void *arg)
static void do_free_global_table(void *arg)
struct type * check_typedef(struct type *type)
#define CATCH(EXCEPTION, MASK)
void typedef_print(struct type *type, struct symbol *newobj, struct ui_file *stream)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
void set_cmd_completer(struct cmd_list_element *cmd, completer_ftype *completer)
void recursively_update_typedef_hash(struct typedef_hash_table *table, struct type *t)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
void free_current_contents(void *ptr)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
static int print_typedefs
unsigned int print_typedefs
void free_typedef_hash(struct typedef_hash_table *table)
void free_ext_lang_type_printers(struct ext_lang_type_printers *printers)
#define SYMBOL_LINKAGE_NAME(symbol)
static struct type_print_options default_ptype_flags
void print_type_scalar(struct type *type, LONGEST val, struct ui_file *stream)
struct type * value_rtti_indirect_type(struct value *v, int *full, int *top, int *using_enc)
static struct symbol * new_symbol(struct die_info *, struct type *, struct dwarf2_cu *)
static void set_print_type_methods(char *args, int from_tty, struct cmd_list_element *c)
static hashval_t hash_typedef_field(const void *p)
static void ptype_command(char *, int)
struct cmd_list_element * setprintlist
#define TYPE_BASECLASS(thistype, index)
void printf_unfiltered(const char *format,...)
unsigned int print_methods
struct ui_file * mem_fileopen(void)
struct expression * parse_expression(const char *)
void cmd_show_list(struct cmd_list_element *list, int from_tty, const char *prefix)
#define LA_PRINT_TYPE(type, varstring, stream, show, level, flags)
static void set_print_type(char *arg, int from_tty)
int types_equal(struct type *a, struct type *b)
void help_list(struct cmd_list_element *list, const char *cmdtype, enum command_class theclass, struct ui_file *stream)
#define TYPE_TARGET_TYPE(thistype)
void print_longest(struct ui_file *stream, int format, int use_c_format, LONGEST val_long)
const char * find_typedef_in_hash(const struct type_print_options *flags, struct type *t)
struct cleanup * make_cleanup_ui_file_delete(struct ui_file *arg)
static void show_print_type(char *args, int from_tty)
char * apply_ext_lang_type_printers(struct ext_lang_type_printers *printers, struct type *type)
#define TYPE_CODE(thistype)
static int eq_typedef_field(const void *a, const void *b)
static void whatis_command(char *, int)
void recursive_dump_type(struct type *type, int spaces)
void get_user_print_options(struct value_print_options *opts)
#define TYPE_NFIELDS(thistype)
struct type * value_rtti_type(struct value *v, int *full, int *top, int *using_enc)
#define CHECK_TYPEDEF(TYPE)
struct cmd_list_element * showprintlist
#define TYPE_TYPEDEF_FIELD(thistype, n)
#define TYPE_TYPEDEF_FIELD_COUNT(thistype)
#define TYPE_TEMPLATE_ARGUMENT(thistype, n)
void maintenance_print_type(char *type_name, int from_tty)
struct type * value_type(const struct value *value)
struct typedef_hash_table * global_typedefs
#define SYMBOL_TYPE(symbol)
struct value * access_value_history(int num)
struct value * evaluate_type(struct expression *exp)
void add_template_parameters(struct typedef_hash_table *table, struct type *t)
struct cleanup * make_cleanup_free_typedef_hash(struct typedef_hash_table *table)
void default_print_typedef(struct type *type, struct symbol *new_symbol, struct ui_file *stream)
#define LA_PRINT_CHAR(ch, type, stream)
void gdb_flush(struct ui_file *file)
struct typedef_hash_table * create_typedef_hash(void)
struct cmd_list_element * showprinttypelist
static void show_print_type_methods(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static struct cleanup * create_global_typedef_table(struct type_print_options *flags)
char * type_to_string(struct type *type)
PTR xcalloc(size_t number, size_t size)
struct typedef_hash_table * local_typedefs
void error(const char *fmt,...)
struct cmd_list_element * add_com(const char *name, enum command_class theclass, cmd_cfunc_ftype *fun, const char *doc)
void do_cleanups(struct cleanup *old_chain)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct cmd_list_element * setprinttypelist
#define TYPE_SAFE_NAME(type)
const ULONGEST const LONGEST len