GDB (xrefs)
|
#include "defs.h"
#include "gdb_obstack.h"
#include "bfd.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "value.h"
#include "gdbcore.h"
#include "command.h"
#include "gdbcmd.h"
#include "target.h"
#include "language.h"
#include "cp-abi.h"
#include "typeprint.h"
#include "valprint.h"
#include <ctype.h>
#include "cli/cli-utils.h"
#include "extension.h"
#include "completer.h"
Go to the source code of this file.
Classes | |
struct | typedef_hash_table |
Variables | |
const struct type_print_options | type_print_raw_options |
static struct type_print_options | default_ptype_flags |
struct cmd_list_element * | setprinttypelist |
struct cmd_list_element * | showprinttypelist |
static int | print_methods = 1 |
static int | print_typedefs = 1 |
void _initialize_typeprint | ( | void | ) |
Definition at line 680 of file typeprint.c.
References _, add_com(), add_prefix_cmd(), add_setshow_boolean_cmd(), class_vars, no_class, print_methods, print_typedefs, ptype_command(), set_cmd_completer(), set_print_type(), set_print_type_methods(), set_print_type_typedefs(), setprintlist, show_print_type(), show_print_type_methods(), show_print_type_typedefs(), showprintlist, and whatis_command().
void add_template_parameters | ( | struct typedef_hash_table * | table, |
struct type * | t | ||
) |
Definition at line 139 of file typeprint.c.
References LOC_TYPEDEF, typedef_field::name, typedef_hash_table::storage, SYMBOL_CLASS, SYMBOL_LINKAGE_NAME, SYMBOL_TYPE, typedef_hash_table::table, typedef_field::type, TYPE_N_TEMPLATE_ARGUMENTS, and TYPE_TEMPLATE_ARGUMENT.
Referenced by c_type_print_base().
struct typedef_hash_table* copy_typedef_hash | ( | struct typedef_hash_table * | table | ) |
Definition at line 227 of file typeprint.c.
References copy_typedef_hash_element(), create_typedef_hash(), and typedef_hash_table::table.
Referenced by c_type_print_base().
|
static |
Definition at line 212 of file typeprint.c.
Referenced by copy_typedef_hash().
|
static |
Definition at line 254 of file typeprint.c.
References create_typedef_hash(), do_free_global_table(), gdb_assert, type_print_options::global_printers, type_print_options::global_typedefs, make_cleanup(), and start_ext_lang_type_printers().
Referenced by whatis_exp().
struct typedef_hash_table* create_typedef_hash | ( | void | ) |
Definition at line 168 of file typeprint.c.
References eq_typedef_field(), hash_typedef_field(), typedef_hash_table::storage, typedef_hash_table::table, xcalloc(), and xfree().
Referenced by c_type_print_base(), copy_typedef_hash(), and create_global_typedef_table().
void default_print_typedef | ( | struct type * | type, |
struct symbol * | new_symbol, | ||
struct ui_file * | stream | ||
) |
Definition at line 346 of file typeprint.c.
|
static |
Definition at line 243 of file typeprint.c.
References flags, free_ext_lang_type_printers(), free_typedef_hash(), type_print_options::global_printers, and type_print_options::global_typedefs.
Referenced by create_global_typedef_table().
|
static |
Definition at line 196 of file typeprint.c.
References free_typedef_hash().
Referenced by make_cleanup_free_typedef_hash().
Definition at line 99 of file typeprint.c.
References typedef_field::type, and types_equal().
Referenced by create_typedef_hash().
|
static |
Definition at line 268 of file typeprint.c.
References apply_ext_lang_type_printers(), type_print_options::global_printers, type_print_options::global_typedefs, typedef_field::name, typedef_hash_table::storage, typedef_hash_table::table, typedef_field::type, and xfree().
Referenced by find_typedef_in_hash().
const char* find_typedef_in_hash | ( | const struct type_print_options * | flags, |
struct type * | t | ||
) |
Definition at line 314 of file typeprint.c.
References find_global_typedef(), type_print_options::local_typedefs, typedef_field::name, typedef_hash_table::table, and typedef_field::type.
Referenced by c_print_type(), and find_typedef_for_canonicalize().
void free_typedef_hash | ( | struct typedef_hash_table * | table | ) |
Definition at line 183 of file typeprint.c.
References typedef_hash_table::storage, typedef_hash_table::table, and xfree().
Referenced by do_free_global_table(), and do_free_typedef_hash().
|
static |
Definition at line 88 of file typeprint.c.
References check_typedef(), typedef_field::type, and TYPE_SAFE_NAME.
Referenced by create_typedef_hash().
void maintenance_print_type | ( | char * | type_name, |
int | from_tty | ||
) |
Definition at line 597 of file typeprint.c.
References do_cleanups(), expression::elts, evaluate_type(), free_current_contents(), make_cleanup(), exp_element::opcode, parse_expression(), recursive_dump_type(), exp_element::type, type, and value_type().
Referenced by _initialize_maint_cmds().
struct cleanup* make_cleanup_free_typedef_hash | ( | struct typedef_hash_table * | table | ) |
Definition at line 204 of file typeprint.c.
References do_free_typedef_hash(), and make_cleanup().
Referenced by c_type_print_base().
Definition at line 522 of file typeprint.c.
References _, CHECK_TYPEDEF, error(), fprintf_filtered(), fputs_filtered(), gdb_flush(), LA_PRINT_CHAR, len, print_longest(), print_type_scalar(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_ENUM, TYPE_CODE_ERROR, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD, TYPE_CODE_METHODPTR, TYPE_CODE_NAMESPACE, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_SET, TYPE_CODE_STRING, TYPE_CODE_STRUCT, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_NFIELDS, TYPE_TARGET_TYPE, and TYPE_UNSIGNED.
Referenced by m2_print_bounds(), m2_print_long_set(), m2_range(), m2_val_print(), pascal_type_print_base(), pascal_val_print(), and print_type_scalar().
|
static |
Definition at line 504 of file typeprint.c.
References whatis_exp().
Referenced by _initialize_typeprint().
void recursively_update_typedef_hash | ( | struct typedef_hash_table * | table, |
struct type * | t | ||
) |
Definition at line 110 of file typeprint.c.
References recursively_update_typedef_hash(), typedef_hash_table::table, TYPE_BASECLASS, TYPE_N_BASECLASSES, TYPE_TYPEDEF_FIELD, and TYPE_TYPEDEF_FIELD_COUNT.
Referenced by c_type_print_base(), and recursively_update_typedef_hash().
|
static |
Definition at line 634 of file typeprint.c.
References all_commands, gdb_stdout, help_list(), printf_unfiltered(), and setprintlist.
Referenced by _initialize_typeprint().
|
static |
Definition at line 650 of file typeprint.c.
References type_print_options::print_methods, and print_methods.
Referenced by _initialize_typeprint().
|
static |
Definition at line 666 of file typeprint.c.
References type_print_options::print_typedefs, and print_typedefs.
Referenced by _initialize_typeprint().
|
static |
Definition at line 642 of file typeprint.c.
References cmd_show_list().
Referenced by _initialize_typeprint().
|
static |
Definition at line 656 of file typeprint.c.
References _, and fprintf_filtered().
Referenced by _initialize_typeprint().
|
static |
Definition at line 672 of file typeprint.c.
References _, and fprintf_filtered().
Referenced by _initialize_typeprint().
Definition at line 360 of file typeprint.c.
References LA_PRINT_TYPE.
Referenced by ada_dump_subexp_body(), ada_lookup_struct_elt_type(), ada_print_subexp(), ada_val_print_num(), ada_value_print(), c_print_typedef(), c_value_print(), disassemble_dwarf_expression(), dump_subexp_body_standard(), generic_val_print(), inspect_type(), java_type_print_base(), java_value_print(), list_arg_or_local(), m2_print_typedef(), pascal_print_typedef(), pascal_type_print_base(), pascal_value_print(), print_subexp_standard(), print_symbol_info(), print_variable_or_computed(), py_print_type(), type_to_string(), and whatis_exp().
char* type_to_string | ( | struct type * | type | ) |
Definition at line 370 of file typeprint.c.
References CATCH, do_cleanups(), END_CATCH, make_cleanup_ui_file_delete(), mem_fileopen(), RETURN_MASK_ALL, TRY, type_print(), and ui_file_xstrdup().
Referenced by c_get_string(), gnuv3_get_typeid(), lookup_struct_elt_type(), print_return_value(), update_type_if_necessary(), varobj_get_type(), and watch_command_1().
Definition at line 338 of file typeprint.c.
References LA_PRINT_TYPEDEF.
Referenced by print_symbol_info().
|
static |
Definition at line 493 of file typeprint.c.
References whatis_exp().
Referenced by _initialize_typeprint().
|
static |
Definition at line 399 of file typeprint.c.
References _, access_value_history(), create_global_typedef_table(), default_ptype_flags, do_cleanups(), error(), evaluate_type(), free_current_contents(), gdb_stdout, get_user_print_options(), LA_PRINT_TYPE, make_cleanup(), null_cleanup(), value_print_options::objectprint, parse_expression(), type_print_options::print_methods, type_print_options::print_typedefs, printf_filtered(), type_print_options::raw, skip_spaces(), type, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, type_print(), TYPE_TARGET_TYPE, value_rtti_indirect_type(), value_rtti_type(), and value_type().
Referenced by ptype_command(), and whatis_command().
|
static |
Definition at line 60 of file typeprint.c.
Referenced by whatis_exp().
|
static |
Definition at line 647 of file typeprint.c.
Referenced by _initialize_typeprint(), and set_print_type_methods().
|
static |
Definition at line 663 of file typeprint.c.
Referenced by _initialize_typeprint(), and set_print_type_typedefs().
struct cmd_list_element* setprinttypelist |
Definition at line 629 of file typeprint.c.
struct cmd_list_element* showprinttypelist |
Definition at line 631 of file typeprint.c.
const struct type_print_options type_print_raw_options |
Definition at line 48 of file typeprint.c.
Referenced by ada_print_subexp(), ada_print_typedef(), cp_print_class_member(), dwarf2_compute_name(), gnuv3_print_method_ptr(), print_symbol(), typy_str(), tyscm_type_name(), user_select_syms(), and yyparse().