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 "gdb_string.h"
#include "exceptions.h"
#include "valprint.h"
#include <errno.h>
#include <ctype.h>
#include "cli/cli-utils.h"
#include "python/python.h"
#include "completer.h"
Go to the source code of this file.
void _initialize_typeprint | ( | void | ) |
void add_template_parameters | ( | struct typedef_hash_table * | table, |
struct type * | t | ||
) |
Definition at line 142 of file typeprint.c.
References LOC_TYPEDEF, typedef_hash_table::storage, SYMBOL_CLASS, SYMBOL_LINKAGE_NAME, SYMBOL_TYPE, typedef_hash_table::table, 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 | ) | [read] |
Definition at line 230 of file typeprint.c.
References copy_typedef_hash_element(), create_typedef_hash(), and typedef_hash_table::table.
Referenced by c_type_print_base().
static int copy_typedef_hash_element | ( | void ** | slot, |
void * | nt | ||
) | [static] |
Definition at line 215 of file typeprint.c.
Referenced by copy_typedef_hash().
static struct cleanup* create_global_typedef_table | ( | struct type_print_options * | flags | ) | [static, read] |
Definition at line 257 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_type_printers().
Referenced by whatis_exp().
struct typedef_hash_table* create_typedef_hash | ( | void | ) | [read] |
Definition at line 171 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 349 of file typeprint.c.
static void do_free_global_table | ( | void * | arg | ) | [static] |
Definition at line 246 of file typeprint.c.
References flags, free_type_printers(), free_typedef_hash(), type_print_options::global_printers, and type_print_options::global_typedefs.
Referenced by create_global_typedef_table().
static void do_free_typedef_hash | ( | void * | arg | ) | [static] |
Definition at line 199 of file typeprint.c.
References free_typedef_hash().
Referenced by make_cleanup_free_typedef_hash().
static int eq_typedef_field | ( | const void * | a, |
const void * | b | ||
) | [static] |
Definition at line 102 of file typeprint.c.
References types_equal().
Referenced by create_typedef_hash().
static const char* find_global_typedef | ( | const struct type_print_options * | flags, |
struct type * | t | ||
) | [static] |
Definition at line 271 of file typeprint.c.
References apply_type_printers(), type_print_options::global_printers, type_print_options::global_typedefs, typedef_hash_table::storage, typedef_hash_table::table, 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 317 of file typeprint.c.
References find_global_typedef(), type_print_options::local_typedefs, and typedef_hash_table::table.
Referenced by c_print_type(), and find_typedef_for_canonicalize().
void free_typedef_hash | ( | struct typedef_hash_table * | table | ) |
Definition at line 186 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 hashval_t hash_typedef_field | ( | const void * | p | ) | [static] |
Definition at line 91 of file typeprint.c.
References check_typedef(), and TYPE_SAFE_NAME.
Referenced by create_typedef_hash().
void maintenance_print_type | ( | char * | typename, |
int | from_tty | ||
) |
Definition at line 598 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().
struct cleanup* make_cleanup_free_typedef_hash | ( | struct typedef_hash_table * | table | ) | [read] |
Definition at line 207 of file typeprint.c.
References do_free_typedef_hash(), and make_cleanup().
Referenced by c_type_print_base().
void print_type_scalar | ( | struct type * | type, |
LONGEST | val, | ||
struct ui_file * | stream | ||
) |
Definition at line 523 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 void ptype_command | ( | char * | typename, |
int | from_tty | ||
) | [static] |
Definition at line 505 of file typeprint.c.
References whatis_exp().
void recursively_update_typedef_hash | ( | struct typedef_hash_table * | table, |
struct type * | t | ||
) |
Definition at line 113 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 void set_print_type | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 635 of file typeprint.c.
References gdb_stdout, help_list(), printf_unfiltered(), and setprintlist.
static void set_print_type_methods | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 651 of file typeprint.c.
References type_print_options::print_methods, and print_methods.
static void set_print_type_typedefs | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 667 of file typeprint.c.
References type_print_options::print_typedefs, and print_typedefs.
static void show_print_type | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 643 of file typeprint.c.
References cmd_show_list().
static void show_print_type_methods | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 657 of file typeprint.c.
References _, and fprintf_filtered().
static void show_print_type_typedefs | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 673 of file typeprint.c.
References _, and fprintf_filtered().
void type_print | ( | struct type * | type, |
const char * | varstring, | ||
struct ui_file * | stream, | ||
int | show | ||
) |
Definition at line 363 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_1(), 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(), whatis_exp(), and wrap_type_print().
char* type_to_string | ( | struct type * | type | ) |
Definition at line 373 of file typeprint.c.
References do_cleanups(), make_cleanup_ui_file_delete(), mem_fileopen(), gdb_exception::reason, RETURN_MASK_ALL, TRY_CATCH, type_print(), and ui_file_xstrdup().
Referenced by c_get_string(), gnuv3_get_typeid(), lookup_struct_elt_type(), update_type_if_necessary(), varobj_get_type(), and watch_command_1().
void typedef_print | ( | struct type * | type, |
struct symbol * | new, | ||
struct ui_file * | stream | ||
) |
Definition at line 341 of file typeprint.c.
References LA_PRINT_TYPEDEF.
Referenced by print_symbol_info().
static void whatis_command | ( | char * | exp, |
int | from_tty | ||
) | [static] |
Definition at line 494 of file typeprint.c.
References whatis_exp().
static void whatis_exp | ( | char * | exp, |
int | show | ||
) | [static] |
Definition at line 400 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_CLASS, TYPE_CODE_PTR, TYPE_CODE_REF, type_print(), TYPE_TARGET_TYPE, value_rtti_indirect_type(), value_rtti_type(), and value_type().
Referenced by ptype_command(), and whatis_command().
struct type_print_options default_ptype_flags [static] |
{ 0, 1, 1, NULL, NULL, NULL }
Definition at line 63 of file typeprint.c.
Referenced by whatis_exp().
int print_methods = 1 [static] |
Definition at line 648 of file typeprint.c.
Referenced by set_print_type_methods().
int print_typedefs = 1 [static] |
Definition at line 664 of file typeprint.c.
Referenced by set_print_type_typedefs().
struct cmd_list_element* setprinttypelist |
Definition at line 630 of file typeprint.c.
struct cmd_list_element* showprinttypelist |
Definition at line 632 of file typeprint.c.
{ 1, 1, 1, NULL, NULL, NULL }
Definition at line 51 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(), and user_select_syms().