GDB (xrefs)
Classes | Typedefs | Functions | Variables
/tmp/gdb-7.10/gdb/gdbtypes.c File Reference
#include "defs.h"
#include "bfd.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdbtypes.h"
#include "expression.h"
#include "language.h"
#include "target.h"
#include "value.h"
#include "demangle.h"
#include "complaints.h"
#include "gdbcmd.h"
#include "cp-abi.h"
#include "hashtab.h"
#include "cp-support.h"
#include "bcache.h"
#include "dwarf2loc.h"
#include "gdbcore.h"

Go to the source code of this file.

Classes

struct  type_equality_entry
 
struct  type_pair
 

Typedefs

typedef struct type_equality_entry type_equality_entry_d
 

Functions

static void show_opaque_type_resolution (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_overload_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_strict_type_checking (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
struct typealloc_type (struct objfile *objfile)
 
struct typealloc_type_arch (struct gdbarch *gdbarch)
 
struct typealloc_type_copy (const struct type *type)
 
struct gdbarchget_type_arch (const struct type *type)
 
struct typeget_target_type (struct type *type)
 
static struct typealloc_type_instance (struct type *oldtype)
 
static void smash_type (struct type *type)
 
struct typemake_pointer_type (struct type *type, struct type **typeptr)
 
struct typelookup_pointer_type (struct type *type)
 
struct typemake_reference_type (struct type *type, struct type **typeptr)
 
struct typelookup_reference_type (struct type *type)
 
struct typemake_function_type (struct type *type, struct type **typeptr)
 
struct typelookup_function_type (struct type *type)
 
struct typelookup_function_type_with_arguments (struct type *type, int nparams, struct type **param_types)
 
int address_space_name_to_int (struct gdbarch *gdbarch, char *space_identifier)
 
const char * address_space_int_to_name (struct gdbarch *gdbarch, int space_flag)
 
static struct typemake_qualified_type (struct type *type, int new_flags, struct type *storage)
 
struct typemake_type_with_address_space (struct type *type, int space_flag)
 
struct typemake_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
 
struct typemake_restrict_type (struct type *type)
 
struct typemake_unqualified_type (struct type *type)
 
struct typemake_atomic_type (struct type *type)
 
void replace_type (struct type *ntype, struct type *type)
 
struct typelookup_memberptr_type (struct type *type, struct type *domain)
 
struct typelookup_methodptr_type (struct type *to_type)
 
struct typeallocate_stub_method (struct type *type)
 
struct typecreate_range_type (struct type *result_type, struct type *index_type, const struct dynamic_prop *low_bound, const struct dynamic_prop *high_bound)
 
struct typecreate_static_range_type (struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
 
static int has_static_range (const struct range_bounds *bounds)
 
int get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
 
int get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound)
 
int discrete_position (struct type *type, LONGEST val, LONGEST *pos)
 
struct typecreate_array_type_with_stride (struct type *result_type, struct type *element_type, struct type *range_type, unsigned int bit_stride)
 
struct typecreate_array_type (struct type *result_type, struct type *element_type, struct type *range_type)
 
struct typelookup_array_range_type (struct type *element_type, LONGEST low_bound, LONGEST high_bound)
 
struct typecreate_string_type (struct type *result_type, struct type *string_char_type, struct type *range_type)
 
struct typelookup_string_range_type (struct type *string_char_type, LONGEST low_bound, LONGEST high_bound)
 
struct typecreate_set_type (struct type *result_type, struct type *domain_type)
 
void make_vector_type (struct type *array_type)
 
struct typeinit_vector_type (struct type *elt_type, int n)
 
struct typeinternal_type_self_type (struct type *type)
 
void set_type_self_type (struct type *type, struct type *self_type)
 
void smash_to_memberptr_type (struct type *type, struct type *self_type, struct type *to_type)
 
void smash_to_methodptr_type (struct type *type, struct type *to_type)
 
void smash_to_method_type (struct type *type, struct type *self_type, struct type *to_type, struct field *args, int nargs, int varargs)
 
const char * type_name_no_tag (const struct type *type)
 
const char * type_name_no_tag_or_error (struct type *type)
 
struct typelookup_typename (const struct language_defn *language, struct gdbarch *gdbarch, const char *name, const struct block *block, int noerr)
 
struct typelookup_unsigned_typename (const struct language_defn *language, struct gdbarch *gdbarch, const char *name)
 
struct typelookup_signed_typename (const struct language_defn *language, struct gdbarch *gdbarch, const char *name)
 
struct typelookup_struct (const char *name, const struct block *block)
 
struct typelookup_union (const char *name, const struct block *block)
 
struct typelookup_enum (const char *name, const struct block *block)
 
struct typelookup_template_type (char *name, struct type *type, const struct block *block)
 
struct typelookup_struct_elt_type (struct type *type, const char *name, int noerr)
 
void get_unsigned_type_max (struct type *type, ULONGEST *max)
 
void get_signed_type_minmax (struct type *type, LONGEST *min, LONGEST *max)
 
int internal_type_vptr_fieldno (struct type *type)
 
void set_type_vptr_fieldno (struct type *type, int fieldno)
 
struct typeinternal_type_vptr_basetype (struct type *type)
 
void set_type_vptr_basetype (struct type *type, struct type *basetype)
 
int get_vptr_fieldno (struct type *type, struct type **basetypep)
 
static void stub_noname_complaint (void)
 
static int is_dynamic_type_internal (struct type *type, int top_level)
 
int is_dynamic_type (struct type *type)
 
static struct typeresolve_dynamic_type_internal (struct type *type, struct property_addr_info *addr_stack, int top_level)
 
static struct typeresolve_dynamic_range (struct type *dyn_range_type, struct property_addr_info *addr_stack)
 
static struct typeresolve_dynamic_array (struct type *type, struct property_addr_info *addr_stack)
 
static struct typeresolve_dynamic_union (struct type *type, struct property_addr_info *addr_stack)
 
static struct typeresolve_dynamic_struct (struct type *type, struct property_addr_info *addr_stack)
 
struct typeresolve_dynamic_type (struct type *type, const gdb_byte *valaddr, CORE_ADDR addr)
 
struct dynamic_propget_dyn_prop (enum dynamic_prop_node_kind prop_kind, const struct type *type)
 
void add_dyn_prop (enum dynamic_prop_node_kind prop_kind, struct dynamic_prop prop, struct type *type, struct objfile *objfile)
 
struct typecheck_typedef (struct type *type)
 
static struct typesafe_parse_type (struct gdbarch *gdbarch, char *p, int length)
 
static void check_stub_method (struct type *type, int method_id, int signature_id)
 
void check_stub_method_group (struct type *type, int method_id)
 
void allocate_cplus_struct_type (struct type *type)
 
void allocate_gnat_aux_type (struct type *type)
 
struct typeinit_type (enum type_code code, int length, int flags, const char *name, struct objfile *objfile)
 
int can_dereference (struct type *t)
 
int is_integral_type (struct type *t)
 
static int is_scalar_type (struct type *type)
 
int is_scalar_type_recursive (struct type *t)
 
int class_or_union_p (const struct type *t)
 
int class_types_same_p (const struct type *a, const struct type *b)
 
static int distance_to_ancestor (struct type *base, struct type *dclass, int is_public)
 
int is_ancestor (struct type *base, struct type *dclass)
 
int is_public_ancestor (struct type *base, struct type *dclass)
 
static int is_unique_ancestor_worker (struct type *base, struct type *dclass, int *offset, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct value *val)
 
int is_unique_ancestor (struct type *base, struct value *val)
 
struct rank sum_ranks (struct rank a, struct rank b)
 
int compare_ranks (struct rank a, struct rank b)
 
int compare_badness (struct badness_vector *a, struct badness_vector *b)
 
struct badness_vectorrank_function (struct type **parms, int nparms, struct value **args, int nargs)
 
static int integer_types_same_name_p (const char *first, const char *second)
 
int types_equal (struct type *a, struct type *b)
 
 DEF_VEC_O (type_equality_entry_d)
 
static int compare_maybe_null_strings (const char *s, const char *t)
 
static int check_types_equal (struct type *type1, struct type *type2, VEC(type_equality_entry_d)**worklist)
 
static int check_types_worklist (VEC(type_equality_entry_d)**worklist, struct bcache *cache)
 
int types_deeply_equal (struct type *type1, struct type *type2)
 
struct rank rank_one_type (struct type *parm, struct type *arg, struct value *value)
 
static void print_bit_vector (B_TYPE *bits, int nbits)
 
static void print_args (struct field *args, int nargs, int spaces)
 
int field_is_static (struct field *f)
 
static void dump_fn_fieldlists (struct type *type, int spaces)
 
static void print_cplus_stuff (struct type *type, int spaces)
 
static void print_gnat_stuff (struct type *type, int spaces)
 
void recursive_dump_type (struct type *type, int spaces)
 
static hashval_t type_pair_hash (const void *item)
 
static int type_pair_eq (const void *item_lhs, const void *item_rhs)
 
htab_t create_copied_types_hash (struct objfile *objfile)
 
static struct dynamic_prop_listcopy_dynamic_prop_list (struct obstack *objfile_obstack, struct dynamic_prop_list *list)
 
struct typecopy_type_recursive (struct objfile *objfile, struct type *type, htab_t copied_types)
 
struct typecopy_type (const struct type *type)
 
struct typearch_type (struct gdbarch *gdbarch, enum type_code code, int length, char *name)
 
struct typearch_integer_type (struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
 
struct typearch_character_type (struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
 
struct typearch_boolean_type (struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
 
struct typearch_float_type (struct gdbarch *gdbarch, int bit, char *name, const struct floatformat **floatformats)
 
struct typearch_complex_type (struct gdbarch *gdbarch, char *name, struct type *target_type)
 
struct typearch_flags_type (struct gdbarch *gdbarch, char *name, int length)
 
void append_flags_type_flag (struct type *type, int bitpos, char *name)
 
struct typearch_composite_type (struct gdbarch *gdbarch, char *name, enum type_code code)
 
struct fieldappend_composite_type_field_raw (struct type *t, char *name, struct type *field)
 
void append_composite_type_field_aligned (struct type *t, char *name, struct type *field, int alignment)
 
void append_composite_type_field (struct type *t, char *name, struct type *field)
 
const struct builtin_typebuiltin_type (struct gdbarch *gdbarch)
 
static void * gdbtypes_post_init (struct gdbarch *gdbarch)
 
const struct objfile_typeobjfile_type (struct objfile *objfile)
 
void _initialize_gdbtypes (void)
 

Variables

const struct rank LENGTH_MISMATCH_BADNESS = {100,0}
 
const struct rank TOO_FEW_PARAMS_BADNESS = {100,0}
 
const struct rank INCOMPATIBLE_TYPE_BADNESS = {100,0}
 
const struct rank EXACT_MATCH_BADNESS = {0,0}
 
const struct rank INTEGER_PROMOTION_BADNESS = {1,0}
 
const struct rank FLOAT_PROMOTION_BADNESS = {1,0}
 
const struct rank BASE_PTR_CONVERSION_BADNESS = {1,0}
 
const struct rank INTEGER_CONVERSION_BADNESS = {2,0}
 
const struct rank FLOAT_CONVERSION_BADNESS = {2,0}
 
const struct rank INT_FLOAT_CONVERSION_BADNESS = {2,0}
 
const struct rank VOID_PTR_CONVERSION_BADNESS = {2,0}
 
const struct rank BOOL_CONVERSION_BADNESS = {3,0}
 
const struct rank BASE_CONVERSION_BADNESS = {2,0}
 
const struct rank REFERENCE_CONVERSION_BADNESS = {2,0}
 
const struct rank NULL_POINTER_CONVERSION_BADNESS = {2,0}
 
const struct rank NS_POINTER_CONVERSION_BADNESS = {10,0}
 
const struct rank NS_INTEGER_POINTER_CONVERSION_BADNESS = {3,0}
 
const struct floatformat * floatformats_ieee_half [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_ieee_single [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_ieee_double [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_ieee_double_littlebyte_bigword [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_i387_ext [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_m68881_ext [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_arm_ext [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_ia64_spill [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_ia64_quad [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_vax_f [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_vax_d [BFD_ENDIAN_UNKNOWN]
 
const struct floatformat * floatformats_ibm_long_double [BFD_ENDIAN_UNKNOWN]
 
static int opaque_type_resolution = 1
 
unsigned int overload_debug = 0
 
static int strict_type_checking = 1
 
const struct cplus_struct_type cplus_struct_default = { }
 
const struct gnat_aux_type gnat_aux_default
 
static struct obstack dont_print_type_obstack
 
static struct gdbarch_datagdbtypes_data
 
static const struct objfile_data * objfile_type_data
 
initialize_file_ftype _initialize_gdbtypes
 

Typedef Documentation

Function Documentation

void _initialize_gdbtypes ( void  )
void add_dyn_prop ( enum dynamic_prop_node_kind  kind,
struct dynamic_prop  prop,
struct type type,
struct objfile objfile 
)

Given a dynamic property PROP of a given KIND, add this dynamic property to the given TYPE.

This function assumes that TYPE is objfile-owned, and that OBJFILE is the TYPE's objfile.

Definition at line 2171 of file gdbtypes.c.

References gdb_assert, dynamic_prop_list::next, objfile::objfile_obstack, dynamic_prop_list::prop, dynamic_prop_list::prop_kind, TYPE_DYN_PROP_LIST, and TYPE_OBJFILE_OWNED.

Referenced by set_die_type().

const char* address_space_int_to_name ( struct gdbarch gdbarch,
int  space_flag 
)
int address_space_name_to_int ( struct gdbarch gdbarch,
char *  space_identifier 
)
struct type* alloc_type ( struct objfile objfile)
struct type* alloc_type_arch ( struct gdbarch gdbarch)
struct type* alloc_type_copy ( const struct type type)
static struct type* alloc_type_instance ( struct type oldtype)
static

Definition at line 260 of file gdbtypes.c.

References OBSTACK_ZALLOC, type, TYPE_CHAIN, TYPE_MAIN_TYPE, TYPE_OBJFILE, and TYPE_OBJFILE_OWNED.

Referenced by make_qualified_type().

void allocate_cplus_struct_type ( struct type type)
void allocate_gnat_aux_type ( struct type type)
struct type* allocate_stub_method ( struct type type)

Definition at line 808 of file gdbtypes.c.

References alloc_type_copy(), type, TYPE_CODE, TYPE_CODE_METHOD, TYPE_LENGTH, TYPE_STUB, and TYPE_TARGET_TYPE.

Referenced by read_type().

void append_composite_type_field ( struct type t,
char *  name,
struct type field 
)
void append_composite_type_field_aligned ( struct type t,
char *  name,
struct type field,
int  alignment 
)
struct field* append_composite_type_field_raw ( struct type t,
char *  name,
struct type field 
)
void append_flags_type_flag ( struct type type,
int  bitpos,
char *  name 
)
struct type* arch_boolean_type ( struct gdbarch gdbarch,
int  bit,
int  unsigned_p,
char *  name 
)
struct type* arch_character_type ( struct gdbarch gdbarch,
int  bit,
int  unsigned_p,
char *  name 
)
struct type* arch_complex_type ( struct gdbarch gdbarch,
char *  name,
struct type target_type 
)
struct type* arch_composite_type ( struct gdbarch gdbarch,
char *  name,
enum type_code  code 
)
struct type* arch_flags_type ( struct gdbarch gdbarch,
char *  name,
int  length 
)
struct type* arch_float_type ( struct gdbarch gdbarch,
int  bit,
char *  name,
const struct floatformat **  floatformats 
)
struct type* arch_integer_type ( struct gdbarch gdbarch,
int  bit,
int  unsigned_p,
char *  name 
)
struct type* arch_type ( struct gdbarch gdbarch,
enum type_code  code,
int  length,
char *  name 
)
const struct builtin_type* builtin_type ( struct gdbarch gdbarch)

Return the type table for the specified architecture.

Definition at line 4766 of file gdbtypes.c.

References gdbarch_data().

Referenced by aarch64_push_dummy_call(), aarch64_vnb_type(), aarch64_vnd_type(), aarch64_vnh_type(), aarch64_vnq_type(), aarch64_vns_type(), ada_evaluate_subexp(), ada_language_arch_info(), ada_tag_value_at_base_address(), ada_tasks_inferior_data_sniffer(), ada_val_print_num(), address_from_register(), alpha_push_dummy_call(), alpha_register_type(), alpha_store_return_value(), amd64_x32_pseudo_register_type(), arm_neon_double_type(), arm_neon_quad_type(), arm_register_type(), assign_component(), avr_register_type(), bfin_register_type(), binop_promote(), bsd_uthread_read_memory_address(), build_gdb_vtable_type(), build_std_type_info_type(), c_language_arch_info(), call_function_by_hand_dummy(), call_site_to_target_addr(), compile_object_load(), compile_probe_arg(), cplus_language_arch_info(), cris_register_type(), crisv32_register_type(), darwin_current_sos(), darwin_load_image_infos(), darwin_read_exec_load_addr(), do_examine(), dtrace_process_dof_probe(), dwarf_get_base_type(), elf_gnu_ifunc_resolve_addr(), elf_gnu_ifunc_resolve_by_got(), elf_gnu_ifunc_resolver_return_stop(), elf_locate_base(), elf_rel_plt_read(), evaluate_subexp_for_sizeof(), evaluate_subexp_standard(), find_command(), float_type_from_length(), frv_register_type(), ft32_register_type(), gdbscm_arch_builtin_type(), gdbtypes_post_init(), gen_expr(), gen_expr_binop_rest(), gen_integral_promotions(), get_running_thread_id(), get_signed_type(), get_unsigned_type(), gnuv3_baseclass_offset(), gnuv3_decode_method_ptr(), h8300_register_type(), handle_stap_probe(), hppa32_convert_from_func_ptr_addr(), hppa32_register_type(), hppa64_register_type(), hppa_skip_trampoline_code(), i386_bnd_type(), i386_mmx_type(), i386_mpx_get_bt_entry(), i386_mpx_info_bounds(), i386_mpx_set_bounds(), i386_pseudo_register_type(), i386_ymm_type(), i386_zmm_type(), ia64_register_type(), iq2000_register_type(), jit_read_code_entry(), jit_read_descriptor(), ld_so_xfer_auxv(), lm32_push_dummy_call(), lm32_register_type(), lm_addr(), lm_info_read(), lookup_array_range_type(), lookup_child_selector(), lookup_objc_class(), m32r_register_type(), m68hc11_register_type(), m68k_register_type(), m88k_register_type(), mep_register_type(), mi_cmd_data_read_memory(), microblaze_register_type(), mips_pseudo_register_type(), mips_register_type(), mn10300_register_type(), moxie_register_type(), msp430_register_type(), msp430x_register_type(), mt_copro_register_type(), mt_register_type(), nios2_register_type(), obsd_auxv_parse(), open_symbol_file_object(), parse_c_float(), parse_go_float(), pascal_language_arch_info(), ppscm_print_string_repr(), print_scalar_formatted(), print_string_repr(), printf_decfloat(), proc_watchpoint_address(), procfs_can_use_hw_breakpoint(), resolve(), resolve_msgsend(), resolve_msgsend_stret(), resolve_msgsend_super(), resolve_msgsend_super_stret(), rs6000_aix_extract_ld_info(), rs6000_builtin_type_vec128(), rs6000_builtin_type_vec64(), rs6000_pseudo_register_type(), rx_register_type(), s390_pseudo_register_type(), safe_parse_type(), scan_dyntag(), score_register_type(), set_next_address(), sh64_register_type(), sh_default_register_type(), sh_sh2a_register_type(), sh_sh3e_register_type(), sh_sh4_register_type(), solib_svr4_r_brk(), solib_svr4_r_ldsomap(), solib_svr4_r_map(), sparc32_register_type(), sparc64_register_type(), spu_builtin_type_vec128(), spu_register_type(), stap_get_expected_argument_type(), stap_modify_semaphore(), tdesc_gdb_type(), tdesc_register_type(), tic6x_register_type(), tilegx_register_type(), unknown_language_arch_info(), unop_promote(), v850_register_type(), value_arg_coerce(), value_nsstring(), value_of_builtin_frame_fp_reg(), value_of_builtin_frame_pc_reg(), varobj_value_get_print_value(), vax_register_type(), vlscm_convert_bytevector(), vlscm_convert_number(), xstormy16_register_type(), xtensa_push_dummy_call(), and xtensa_register_type().

int can_dereference ( struct type t)

Definition at line 2678 of file gdbtypes.c.

References CHECK_TYPEDEF, TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_VOID, and TYPE_TARGET_TYPE.

Referenced by print_value_flags().

static void check_stub_method ( struct type type,
int  method_id,
int  signature_id 
)
static
void check_stub_method_group ( struct type type,
int  method_id 
)
struct type* check_typedef ( struct type type)

Definition at line 2217 of file gdbtypes.c.

References alloc_type_arch(), check_typedef(), currently_reading_symtab, gdb_assert, get_type_arch(), type::instance_flags, lookup_symbol(), lookup_transparent_type(), make_qualified_type(), name, opaque_type_resolution, STRUCT_DOMAIN, stub_noname_complaint(), SYMBOL_TYPE, type, TYPE_CODE, TYPE_CODE_RANGE, TYPE_CODE_TYPEDEF, TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL, TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE, TYPE_INSTANCE_FLAGS, TYPE_IS_OPAQUE, TYPE_LENGTH, type_name_no_tag(), TYPE_OBJFILE, TYPE_STUB, TYPE_TARGET_STUB, and TYPE_TARGET_TYPE.

Referenced by aarch64_extract_return_value(), aarch64_push_dummy_call(), aarch64_store_return_value(), aarch64_type_align(), ada_array_bound(), ada_array_bound_from_type(), ada_array_length(), ada_evaluate_subexp(), ada_get_field_index(), ada_is_redundant_index_type_desc(), ada_tasks_inferior_data_sniffer(), ada_val_print_ref(), ada_value_ptr_subscript(), adjust_value_for_child_access(), allocate_value_lazy(), alpha_push_dummy_call(), amd64_classify_aggregate(), arm_push_dummy_call(), arm_return_in_memory(), arm_type_align(), arm_vfp_abi_for_function(), arm_vfp_cprc_sub_candidate(), avr_push_dummy_call(), bfin_push_dummy_call(), binop_promote(), binop_types_user_defined_p(), c_get_string(), c_textual_element_type(), c_type_print_base(), c_val_print(), c_value_of_variable(), c_value_print(), call_function_by_hand_dummy(), can_use_hardware_watchpoint(), check_condition(), check_parameter_typelist(), check_typedef(), classify_inner_name(), classify_type(), coerce_array(), coerce_ref(), coerce_ref_if_computed(), collect_symbol(), compile_object_load(), compute_vtable_size(), constrained_packed_array_type(), convert_char_literal(), cp_find_class_member(), cp_find_type_baseclass_by_name(), cp_lookup_bare_symbol(), cp_lookup_rtti_type(), cp_print_value(), create_range_type(), create_value(), decimal_from_integral(), default_read_var_value(), do_ppc_sysv_return_value(), do_search_struct_field(), dynamic_array_type(), encode_actions_1(), entry_data_value_coerce_ref(), evaluate_struct_tuple(), evaluate_subexp_c(), evaluate_subexp_for_address(), evaluate_subexp_for_sizeof(), evaluate_subexp_java(), evaluate_subexp_modula2(), evaluate_subexp_opencl(), evaluate_subexp_standard(), evaluate_subexp_with_coercion(), f77_get_dynamic_length_of_aggregate(), f_val_print(), find_function_addr(), find_method(), find_overload_match(), find_size_for_pointer_math(), fp_register_arg_p(), frv_push_dummy_call(), gdbpy_get_xmethod_result_type(), gdbpy_invoke_xmethod(), gdbscm_type_sizeof(), gdbscm_type_strip_typedefs(), gdbscm_value_call(), gdbscm_value_referenced_value(), gdbscm_value_subscript(), gen_bitfield_ref(), gen_cast(), gen_deref(), gen_expr(), gen_expr_binop_rest(), gen_int_literal(), gen_struct_ref(), gen_struct_ref_recursive(), gen_trace_static_fields(), gen_traced_pop(), gen_usual_arithmetic(), gen_var_ref(), generate_register_struct(), generate_vla_size(), generic_val_print(), get_internalvar_integer(), get_regs_type(), get_symbol_field_type(), get_target_type(), get_type(), get_value_at(), get_vptr_fieldno(), gnuv2_baseclass_offset(), gnuv2_virtual_fn_field(), gnuv3_get_typeid(), gnuv3_method_ptr_to_value(), gnuv3_pass_by_reference(), gnuv3_print_vtable(), gnuv3_rtti_type(), gnuv3_virtual_fn_field(), hash_typedef_field(), hppa32_push_dummy_call(), i386_16_byte_align_p(), i386_darwin_arg_type_alignment(), i386_reg_struct_return_p(), i386_return_value(), ia64_push_dummy_call(), indirect_pieced_value(), inspect_type(), is_dynamic_type_internal(), is_float_or_hfa_type_recurse(), is_hfa(), is_object_type(), is_scalar_type_recursive(), is_unique_ancestor_worker(), java_print_value_fields(), java_val_print(), list_arg_or_local(), list_args_or_locals(), lm32_push_dummy_call(), lookup_function_type_with_arguments(), lval_func_check_synthetic_pointer(), lval_func_read(), lval_func_write(), m2_val_print(), m68k_svr4_return_value(), m88k_8_byte_align_p(), make_params(), make_symbol_overload_list_adl_namespace(), mi_print_value_p(), mips_eabi_push_dummy_call(), mips_eabi_return_value(), mips_n32n64_fp_arg_chunk_p(), mips_n32n64_push_dummy_call(), mips_n32n64_return_value(), mips_o32_push_dummy_call(), mips_o64_push_dummy_call(), mn10300_type_align(), mn10300_use_struct_convention(), msp430_push_dummy_call(), nios2_push_dummy_call(), opencl_component_ref(), opencl_logical_not(), opencl_relop(), opencl_value_cast(), pack_long(), pack_unsigned_long(), pascal_object_print_value(), pascal_printstr(), pascal_val_print(), ppc64_aggregate_candidate(), ppc64_sysv_abi_push_dummy_call(), ppc64_sysv_abi_push_param(), ppc64_sysv_abi_return_value(), ppc_sysv_abi_push_dummy_call(), ppc_sysv_use_opencl_abi(), print_formatted(), print_one_vtable(), print_symbol(), print_unpacked_pointer(), print_variable_at_address(), print_variable_or_computed(), ptrmath_type_p(), py_print_type(), py_print_value(), rank_one_type(), read_frame_register_value(), read_one_struct_field(), read_subrange_type(), read_tag_ptr_to_member_type(), require_rvalue(), resolve_dynamic_array(), resolve_dynamic_struct(), resolve_dynamic_type(), resolve_dynamic_type_internal(), resolve_subexp(), rs6000_lynx178_push_dummy_call(), rs6000_push_dummy_call(), rx_push_dummy_call(), s390_effective_inner_type(), s390_handle_arg(), s390_push_dummy_call(), s390_return_value(), s390_value_from_register(), scalar_binop(), scope_info(), score_push_dummy_call(), search_struct_method(), set_internalvar(), sh_is_renesas_calling_convention(), slot_alignment_is_next_even(), sparc32_struct_return_from_sym(), sparc64_16_byte_align_p(), sparc64_extract_floating_fields(), sparc64_store_floating_fields(), spu_push_dummy_call(), spu_return_value(), store_regs(), tic6x_arg_type_alignment(), tic6x_push_dummy_call(), tlb_value_read(), type_from_class(), typecmp(), types_equal(), typy_get_sizeof(), typy_strip_typedefs(), typy_template_argument(), tyscm_get_composite(), unop_promote(), unop_user_defined_p(), unpack_long(), update_watchpoint(), v850_eight_byte_align_p(), val_print(), val_print_array_elements(), val_print_packed_array_elements(), valpy_call(), valpy_getitem(), valpy_nonzero(), valpy_referenced_value(), value_actual_type(), value_addr(), value_arg_coerce(), value_args_as_decimal(), value_binop(), value_cast(), value_cast_pointers(), value_cast_structs(), value_coerce_array(), value_coerce_to_target(), value_complement(), value_concat(), value_dynamic_cast(), value_equal(), value_equal_contents(), value_f90_subarray(), value_fetch_lazy(), value_find_oload_method_list(), value_from_contents_and_address(), value_from_double(), value_from_pointer(), value_from_register(), value_has_field(), value_in(), value_ind(), value_less(), value_logical_not(), value_must_coerce_to_target(), value_neg(), value_of_dwarf_reg_entry(), value_one(), value_pos(), value_primitive_field(), value_ptradd(), value_ptrdiff(), value_ref(), value_reinterpret_cast(), value_rtti_indirect_type(), value_slice(), value_struct_element_index(), value_struct_elt(), value_struct_elt_bitpos(), value_struct_elt_for_reference(), value_subscript(), value_subscripted_rvalue(), value_vector_widen(), value_x_binop(), value_x_unop(), varobj_get_value_type(), vector_binop(), vector_relop(), vlscm_convert_bytevector(), watch_command_1(), xtensa_push_dummy_call(), and yyparse().

static int check_types_equal ( struct type type1,
struct type type2,
VEC(type_equality_entry_d)**  worklist 
)
static
static int check_types_worklist ( VEC(type_equality_entry_d)**  worklist,
struct bcache cache 
)
static
int class_or_union_p ( const struct type t)

Definition at line 2767 of file gdbtypes.c.

References TYPE_CODE, TYPE_CODE_STRUCT, and TYPE_CODE_UNION.

Referenced by call_function_by_hand_dummy().

int class_types_same_p ( const struct type a,
const struct type b 
)
int compare_badness ( struct badness_vector a,
struct badness_vector b 
)

Definition at line 2965 of file gdbtypes.c.

References compare_ranks(), badness_vector::length, and badness_vector::rank.

Referenced by find_oload_champ(), and find_overload_match().

static int compare_maybe_null_strings ( const char *  s,
const char *  t 
)
static

Definition at line 3163 of file gdbtypes.c.

Referenced by check_types_equal().

int compare_ranks ( struct rank  a,
struct rank  b 
)

Definition at line 2937 of file gdbtypes.c.

References rank::rank, and rank::subrank.

Referenced by classify_oload_match(), compare_badness(), and compare_parameters().

static struct dynamic_prop_list* copy_dynamic_prop_list ( struct obstack *  objfile_obstack,
struct dynamic_prop_list list 
)
static

Definition at line 4326 of file gdbtypes.c.

References dynamic_prop_list::next, and dynamic_prop_list::prop.

Referenced by copy_type(), and copy_type_recursive().

struct type* copy_type ( const struct type type)
struct type* copy_type_recursive ( struct objfile objfile,
struct type type,
htab_t  copied_types 
)
struct type* create_array_type ( struct type result_type,
struct type element_type,
struct type range_type 
)
struct type* create_array_type_with_stride ( struct type result_type,
struct type element_type,
struct type range_type,
unsigned int  bit_stride 
)
htab_t create_copied_types_hash ( struct objfile objfile)
struct type* create_range_type ( struct type result_type,
struct type index_type,
const struct dynamic_prop low_bound,
const struct dynamic_prop high_bound 
)
struct type* create_set_type ( struct type result_type,
struct type domain_type 
)
struct type* create_static_range_type ( struct type result_type,
struct type index_type,
LONGEST  low_bound,
LONGEST  high_bound 
)
struct type* create_string_type ( struct type result_type,
struct type string_char_type,
struct type range_type 
)

Definition at line 1152 of file gdbtypes.c.

References create_array_type(), TYPE_CODE, and TYPE_CODE_STRING.

Referenced by read_tag_string_type().

DEF_VEC_O ( type_equality_entry_d  )
int discrete_position ( struct type type,
LONGEST  val,
LONGEST pos 
)
static int distance_to_ancestor ( struct type base,
struct type dclass,
int  is_public 
)
static
static void dump_fn_fieldlists ( struct type type,
int  spaces 
)
static
int field_is_static ( struct field f)
static void* gdbtypes_post_init ( struct gdbarch gdbarch)
static

Definition at line 4772 of file gdbtypes.c.

References arch_character_type(), arch_complex_type(), arch_float_type(), arch_integer_type(), arch_type(), builtin_type::builtin_bool, builtin_type::builtin_char, builtin_type::builtin_char16, builtin_type::builtin_char32, builtin_type::builtin_complex, builtin_type::builtin_data_ptr, builtin_type::builtin_decdouble, builtin_type::builtin_decfloat, builtin_type::builtin_declong, builtin_type::builtin_double, builtin_type::builtin_double_complex, builtin_type::builtin_float, builtin_type::builtin_func_func, builtin_type::builtin_func_ptr, builtin_type::builtin_int, builtin_type::builtin_int0, builtin_type::builtin_int128, builtin_type::builtin_int16, builtin_type::builtin_int32, builtin_type::builtin_int64, builtin_type::builtin_int8, builtin_type::builtin_long, builtin_type::builtin_long_double, builtin_type::builtin_long_long, builtin_type::builtin_short, builtin_type::builtin_signed_char, builtin_type::builtin_string, builtin_type::builtin_true_char, builtin_type::builtin_true_unsigned_char, builtin_type(), builtin_type::builtin_uint128, builtin_type::builtin_uint16, builtin_type::builtin_uint32, builtin_type::builtin_uint64, builtin_type::builtin_uint8, builtin_type::builtin_unsigned_char, builtin_type::builtin_unsigned_int, builtin_type::builtin_unsigned_long, builtin_type::builtin_unsigned_long_long, builtin_type::builtin_unsigned_short, builtin_type::builtin_void, gdbarch_char_signed(), gdbarch_double_bit(), gdbarch_double_format(), gdbarch_float_bit(), gdbarch_float_format(), gdbarch_int_bit(), gdbarch_long_bit(), gdbarch_long_double_bit(), gdbarch_long_double_format(), gdbarch_long_long_bit(), GDBARCH_OBSTACK_ZALLOC, gdbarch_short_bit(), builtin_type::internal_fn, lookup_function_type(), lookup_pointer_type(), TARGET_CHAR_BIT, TYPE_CODE_BOOL, TYPE_CODE_DECFLOAT, TYPE_CODE_INTERNAL_FUNCTION, TYPE_CODE_STRING, TYPE_CODE_VOID, TYPE_CODE_XMETHOD, TYPE_INSTANCE_FLAG_NOTTEXT, TYPE_INSTANCE_FLAGS, and builtin_type::xmethod.

Referenced by _initialize_gdbtypes().

int get_array_bounds ( struct type type,
LONGEST low_bound,
LONGEST high_bound 
)
int get_discrete_bounds ( struct type type,
LONGEST lowp,
LONGEST highp 
)
struct dynamic_prop* get_dyn_prop ( enum dynamic_prop_node_kind  kind,
const struct type type 
)

Return the dynamic property of the requested KIND from TYPE's list of dynamic properties.

Definition at line 2155 of file gdbtypes.c.

References dynamic_prop_list::next, dynamic_prop_list::prop, dynamic_prop_list::prop_kind, and TYPE_DYN_PROP_LIST.

void get_signed_type_minmax ( struct type type,
LONGEST min,
LONGEST max 
)
struct type* get_target_type ( struct type type)

This returns the target type (or NULL) of TYPE, also skipping past typedefs.

Definition at line 243 of file gdbtypes.c.

References check_typedef(), type, and TYPE_TARGET_TYPE.

Referenced by adjust_value_for_child_access(), c_describe_child(), c_number_of_children(), and varobj_get_value_type().

struct gdbarch* get_type_arch ( const struct type )

Return the type's architecture. For types owned by an architecture, that architecture is returned. For types owned by an objfile, that objfile's architecture is returned.

Definition at line 232 of file gdbtypes.c.

References get_objfile_arch(), TYPE_OBJFILE_OWNED, and TYPE_OWNER.

Referenced by ada_val_print_num(), ada_val_print_string(), ada_value_assign(), ada_value_binop(), ada_value_primitive_packed_val(), add_class_symbol(), c_emit_char(), c_get_string(), c_printchar(), c_printstr(), c_type_print_modifier(), c_val_print(), check_stub_method(), check_typedef(), copy_type_recursive(), cp_print_class_member(), cp_print_value_fields(), decode_constrained_packed_array(), default_print_one_register_info(), default_read_var_value(), extract_typed_address(), f_get_encoding(), f_val_print(), find_function_addr(), float_type_from_length(), floatformat_from_type(), gdbpy_apply_val_pretty_printer(), gdbscm_apply_val_pretty_printer(), gdbscm_value_subscript(), generic_emit_char(), generic_printstr(), generic_val_print(), gnuv3_baseclass_offset(), gnuv3_get_typeid(), gnuv3_get_typename_from_type_info(), gnuv3_make_method_ptr(), gnuv3_method_ptr_size(), gnuv3_method_ptr_to_value(), gnuv3_print_method_ptr(), gnuv3_print_vtable(), gnuv3_rtti_type(), gnuv3_virtual_fn_field(), java_get_encoding(), java_val_print(), java_value_print(), lookup_array_range_type(), m2_val_print(), make_pointer_type(), make_reference_type(), modify_field(), pack_long(), pack_unsigned_long(), pascal_printstr(), pascal_val_print(), print_decimal_floating(), print_formatted(), print_go_string(), print_scalar_formatted(), print_unpacked_pointer(), print_variable_at_address(), printf_decfloat(), printf_wide_c_string(), printstr(), read_pieced_value(), scalar_binop(), smash_to_memberptr_type(), store_typed_address(), ui_printf(), unpack_bits_as_long(), unpack_double(), unpack_long(), unpack_value_bitfield(), update_watchpoint(), val_print_string(), val_print_type_code_int(), valpy_nonzero(), value_args_as_decimal(), value_as_address(), value_assign(), value_assign_to_component(), value_bit_index(), value_cast(), value_logical_not(), value_neg(), value_one(), value_pointer(), value_x_unop(), varobj_value_get_print_value(), and write_pieced_value().

void get_unsigned_type_max ( struct type type,
ULONGEST max 
)
int get_vptr_fieldno ( struct type type,
struct type **  basetypep 
)
static int has_static_range ( const struct range_bounds bounds)
static
struct type* init_type ( enum  type_code,
int  ,
int  ,
const char *  ,
struct objfile  
)
struct type* init_vector_type ( struct type elt_type,
int  n 
)
static int integer_types_same_name_p ( const char *  first,
const char *  second 
)
static

Definition at line 3048 of file gdbtypes.c.

Referenced by rank_one_type().

struct type* internal_type_self_type ( struct type type)
struct type* internal_type_vptr_basetype ( struct type type)
int internal_type_vptr_fieldno ( struct type type)
int is_ancestor ( struct type base,
struct type dclass 
)

Definition at line 2838 of file gdbtypes.c.

References distance_to_ancestor().

Referenced by value_dynamic_cast().

int is_dynamic_type ( struct type type)
static int is_dynamic_type_internal ( struct type type,
int  top_level 
)
static
int is_integral_type ( struct type t)
int is_public_ancestor ( struct type base,
struct type dclass 
)

Definition at line 2847 of file gdbtypes.c.

References distance_to_ancestor().

Referenced by value_dynamic_cast().

static int is_scalar_type ( struct type type)
static
int is_scalar_type_recursive ( struct type t)
int is_unique_ancestor ( struct type base,
struct value val 
)
static int is_unique_ancestor_worker ( struct type base,
struct type dclass,
int offset,
const gdb_byte valaddr,
int  embedded_offset,
CORE_ADDR  address,
struct value val 
)
static
struct type* lookup_array_range_type ( struct type element_type,
LONGEST  low_bound,
LONGEST  high_bound 
)
struct type* lookup_enum ( const char *  name,
const struct block block 
)
struct type* lookup_function_type ( struct type type)
struct type* lookup_function_type_with_arguments ( struct type type,
int  nparams,
struct type **  param_types 
)
struct type* lookup_memberptr_type ( struct type type,
struct type domain 
)
struct type* lookup_methodptr_type ( struct type to_type)
struct type* lookup_pointer_type ( struct type type)

Definition at line 368 of file gdbtypes.c.

References make_pointer_type().

Referenced by aarch64_push_dummy_call(), aarch64_stap_parse_special_token(), ada_evaluate_subexp(), ada_get_tsd_from_tag(), ada_language_arch_info(), ada_tag_value_at_base_address(), ada_type_of_array(), ada_val_print_ref(), ada_value_ptr_subscript(), ada_varobj_ind(), address_of_variable(), alpha_push_dummy_call(), amd64_dtrace_parse_probe_argument(), arm_stap_parse_special_token(), call_function_by_hand_dummy(), check_stub_method(), compile_object_run(), decode_type(), default_read_var_value(), define_symbol(), desc_bounds(), do_module_cleanup(), evaluate_subexp_for_address(), evaluate_subexp_java(), evaluate_subexp_standard(), evaluate_subexp_with_coercion(), find_function_in_inferior(), flush_ea_cache(), follow_types(), gdbpy_get_xmethod_arg_types(), gdbpy_get_xmethod_result_type(), gdbpy_invoke_xmethod(), gdbscm_type_pointer(), gdbscm_value_dynamic_type(), gdbtypes_post_init(), gen_address_of(), gen_usual_unary(), gnuv2_virtual_fn_field(), gnuv3_get_virtual_fn(), gnuv3_get_vtable(), gnuv3_method_ptr_to_value(), i386_stap_parse_special_token_three_arg_disp(), i386_stap_parse_special_token_triplet(), java_link_class_type(), java_value_print(), linux_get_siginfo_type(), read_tag_pointer_type(), sparc32_store_arguments(), sparc64_store_arguments(), stap_parse_register_operand(), thin_data_pntr(), type_from_class(), typy_lookup_type(), typy_pointer(), upgrade_type(), valpy_get_dynamic_type(), valpy_getitem(), value_addr(), value_arg_coerce(), value_coerce_array(), value_coerce_function(), value_fn_field(), value_nsstring(), value_reinterpret_cast(), value_rtti_indirect_type(), value_struct_elt_for_reference(), windows_get_tlb_type(), x_command(), and yyparse().

struct type* lookup_reference_type ( struct type type)
struct type* lookup_signed_typename ( const struct language_defn language,
struct gdbarch gdbarch,
const char *  name 
)

Definition at line 1433 of file gdbtypes.c.

References lookup_typename().

Referenced by binop_promote(), and yyparse().

struct type* lookup_string_range_type ( struct type string_char_type,
LONGEST  low_bound,
LONGEST  high_bound 
)

Definition at line 1164 of file gdbtypes.c.

References lookup_array_range_type(), TYPE_CODE, and TYPE_CODE_STRING.

Referenced by value_string().

struct type* lookup_struct ( const char *  name,
const struct block block 
)
struct type* lookup_struct_elt_type ( struct type type,
const char *  name,
int  noerr 
)
struct type* lookup_template_type ( char *  name,
struct type type,
const struct block block 
)

Definition at line 1519 of file gdbtypes.c.

References _, error(), lookup_symbol(), SYMBOL_TYPE, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_NAME, and VAR_DOMAIN.

Referenced by yyparse().

struct type* lookup_typename ( const struct language_defn language,
struct gdbarch gdbarch,
const char *  name,
const struct block block,
int  noerr 
)
struct type* lookup_union ( const char *  name,
const struct block block 
)
struct type* lookup_unsigned_typename ( const struct language_defn language,
struct gdbarch gdbarch,
const char *  name 
)

Definition at line 1422 of file gdbtypes.c.

References lookup_typename().

Referenced by binop_promote(), and yyparse().

struct type* make_atomic_type ( struct type type)

Definition at line 720 of file gdbtypes.c.

References make_qualified_type(), TYPE_INSTANCE_FLAG_ATOMIC, and TYPE_INSTANCE_FLAGS.

Referenced by read_tag_atomic_type().

struct type* make_cv_type ( int  cnst,
int  voltl,
struct type type,
struct type **  typeptr 
)
struct type* make_function_type ( struct type type,
struct type **  typeptr 
)
struct type* make_pointer_type ( struct type type,
struct type **  typeptr 
)
static struct type* make_qualified_type ( struct type type,
int  new_flags,
struct type storage 
)
static
struct type* make_reference_type ( struct type type,
struct type **  typeptr 
)
struct type* make_restrict_type ( struct type type)
struct type* make_type_with_address_space ( struct type type,
int  space_flag 
)
struct type* make_unqualified_type ( struct type type)
void make_vector_type ( struct type array_type)
const struct objfile_type* objfile_type ( struct objfile objfile)

Return the type table for the specified objfile.

Definition at line 4909 of file gdbtypes.c.

References objfile_type::builtin_char, objfile_type::builtin_core_addr, objfile_type::builtin_double, objfile_type::builtin_error, objfile_type::builtin_float, objfile_type::builtin_int, objfile_type::builtin_long, objfile_type::builtin_long_double, objfile_type::builtin_long_long, objfile_type::builtin_short, objfile_type::builtin_signed_char, objfile_type::builtin_unsigned_char, objfile_type::builtin_unsigned_int, objfile_type::builtin_unsigned_long, objfile_type::builtin_unsigned_long_long, objfile_type::builtin_unsigned_short, objfile_type::builtin_void, gdbarch_addr_bit(), gdbarch_char_signed(), gdbarch_double_bit(), gdbarch_double_format(), gdbarch_float_bit(), gdbarch_float_format(), gdbarch_int_bit(), gdbarch_long_bit(), gdbarch_long_double_bit(), gdbarch_long_double_format(), gdbarch_long_long_bit(), gdbarch_short_bit(), get_objfile_arch(), HOST_CHAR_BIT, init_type(), objfile_type::nodebug_data_symbol, objfile_type::nodebug_got_plt_symbol, objfile_type::nodebug_text_gnu_ifunc_symbol, objfile_type::nodebug_text_symbol, objfile_type::nodebug_tls_symbol, objfile_type::nodebug_unknown_symbol, objfile::objfile_obstack, objfile_type(), OBSTACK_CALLOC, TARGET_CHAR_BIT, TYPE_CODE_ERROR, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_VOID, TYPE_FLAG_GNU_IFUNC, TYPE_FLAG_NOSIGN, TYPE_FLAG_UNSIGNED, TYPE_FLOATFORMAT, and TYPE_TARGET_TYPE.

Referenced by basic_type(), convert_symbol_bmsym(), dbx_lookup_type(), decode_base_type(), decode_type(), define_symbol(), die_type(), error_type(), flush_ea_cache(), new_symbol_full(), objfile_type(), parse_procedure(), parse_symbol(), process_xcoff_symbol(), psymtab_to_symtab_1(), read_array_type(), read_range_type(), read_subrange_type(), read_subroutine_type(), read_tag_string_type(), rs6000_builtin_type(), and upgrade_type().

static void print_args ( struct field args,
int  nargs,
int  spaces 
)
static

Definition at line 3781 of file gdbtypes.c.

References name, printfi_filtered(), and recursive_dump_type().

Referenced by dump_fn_fieldlists(), print_frame_args(), and py_print_frame().

static void print_bit_vector ( B_TYPE bits,
int  nbits 
)
static

Definition at line 3759 of file gdbtypes.c.

References B_TST, printf_filtered(), and puts_filtered().

Referenced by print_cplus_stuff().

static void print_cplus_stuff ( struct type type,
int  spaces 
)
static
static void print_gnat_stuff ( struct type type,
int  spaces 
)
static

Definition at line 3937 of file gdbtypes.c.

References printfi_filtered(), recursive_dump_type(), and TYPE_DESCRIPTIVE_TYPE.

Referenced by recursive_dump_type().

struct badness_vector* rank_function ( struct type **  parms,
int  nparms,
struct value **  args,
int  nargs 
)
struct rank rank_one_type ( struct type parm,
struct type arg,
struct value value 
)
void recursive_dump_type ( struct type type,
int  spaces 
)

Definition at line 3953 of file gdbtypes.c.

References _, dont_print_type_obstack, gdb_print_host_address(), gdb_stdout, HAVE_CPLUS_STRUCT, name, plongest(), print_cplus_stuff(), print_gnat_stuff(), printf_filtered(), printfi_filtered(), puts_filtered(), recursive_dump_type(), TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2, TYPE_ATOMIC, TYPE_CALLING_CONVENTION, TYPE_CHAIN, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_COMPLEX, TYPE_CODE_ENUM, TYPE_CODE_ERROR, TYPE_CODE_FLAGS, 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_SPACE, TYPE_CODE_STRING, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_CONST, TYPE_CPLUS_SPECIFIC, TYPE_DATA_SPACE, TYPE_FIELD_BITPOS, TYPE_FIELD_BITSIZE, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_FIELDS, TYPE_FIXED_INSTANCE, TYPE_FLOATFORMAT, TYPE_GNAT_SPECIFIC, TYPE_HIGH_BOUND, TYPE_HIGH_BOUND_UNDEFINED, TYPE_INCOMPLETE, TYPE_INSTANCE_FLAGS, TYPE_LENGTH, TYPE_LOW_BOUND, TYPE_LOW_BOUND_UNDEFINED, TYPE_NAME, TYPE_NFIELDS, TYPE_NFN_FIELDS, TYPE_NOSIGN, TYPE_NOTTEXT, TYPE_OBJFILE_OWNED, TYPE_OWNER, TYPE_POINTER_TYPE, TYPE_PROTOTYPED, TYPE_REFERENCE_TYPE, TYPE_RESTRICT, TYPE_SELF_TYPE, TYPE_SPECIFIC_CPLUS_STUFF, TYPE_SPECIFIC_FIELD, TYPE_SPECIFIC_FLOATFORMAT, TYPE_SPECIFIC_FUNC, TYPE_SPECIFIC_GNAT_STUFF, TYPE_SPECIFIC_SELF_TYPE, TYPE_STATIC, TYPE_STUB, TYPE_STUB_SUPPORTED, TYPE_TAG_NAME, TYPE_TARGET_STUB, TYPE_TARGET_TYPE, TYPE_UNSIGNED, TYPE_VARARGS, TYPE_VECTOR, and TYPE_VOLATILE.

Referenced by dump_fn_fieldlists(), maintenance_print_type(), print_args(), print_cplus_stuff(), print_gnat_stuff(), and recursive_dump_type().

void replace_type ( struct type ntype,
struct type type 
)
static struct type* resolve_dynamic_array ( struct type type,
struct property_addr_info addr_stack 
)
static
static struct type* resolve_dynamic_range ( struct type dyn_range_type,
struct property_addr_info addr_stack 
)
static
static struct type* resolve_dynamic_struct ( struct type type,
struct property_addr_info addr_stack 
)
static
struct type* resolve_dynamic_type ( struct type type,
const gdb_byte valaddr,
CORE_ADDR  addr 
)

Resolve all dynamic values of a type e.g. array bounds to static values. ADDR specifies the location of the variable the type is bound to. If TYPE has no dynamic properties return TYPE; otherwise a new type with static properties is returned.

Definition at line 2143 of file gdbtypes.c.

References property_addr_info::addr, check_typedef(), resolve_dynamic_type_internal(), and property_addr_info::valaddr.

Referenced by ada_discrete_type_high_bound(), ada_discrete_type_low_bound(), ada_val_print_1(), default_read_var_value(), and value_from_contents_and_address().

static struct type * resolve_dynamic_type_internal ( struct type type,
struct property_addr_info addr_stack,
int  top_level 
)
static
static struct type* resolve_dynamic_union ( struct type type,
struct property_addr_info addr_stack 
)
static
static struct type* safe_parse_type ( struct gdbarch gdbarch,
char *  p,
int  length 
)
static
void set_type_self_type ( struct type type,
struct type self_type 
)
void set_type_vptr_basetype ( struct type type,
struct type basetype 
)
void set_type_vptr_fieldno ( struct type type,
int  fieldno 
)
static void show_opaque_type_resolution ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 131 of file gdbtypes.c.

References _, and fprintf_filtered().

Referenced by _initialize_gdbtypes().

static void show_overload_debug ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 143 of file gdbtypes.c.

References _, and fprintf_filtered().

Referenced by _initialize_gdbtypes().

static void show_strict_type_checking ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 153 of file gdbtypes.c.

References _, and fprintf_filtered().

Referenced by _initialize_gdbtypes().

void smash_to_memberptr_type ( struct type type,
struct type self_type,
struct type to_type 
)
void smash_to_method_type ( struct type type,
struct type self_type,
struct type to_type,
struct field args,
int  nargs,
int  varargs 
)
void smash_to_methodptr_type ( struct type type,
struct type to_type 
)
static void smash_type ( struct type type)
static
static void stub_noname_complaint ( void  )
static

Definition at line 1782 of file gdbtypes.c.

References _, complaint(), and symfile_complaints.

Referenced by check_typedef().

struct rank sum_ranks ( struct rank  a,
struct rank  b 
)

Definition at line 2923 of file gdbtypes.c.

References rank::rank, and rank::subrank.

Referenced by rank_one_type().

const char* type_name_no_tag ( const struct type type)
const char* type_name_no_tag_or_error ( struct type type)
static int type_pair_eq ( const void *  item_lhs,
const void *  item_rhs 
)
static

Definition at line 4303 of file gdbtypes.c.

References type_pair::old.

Referenced by create_copied_types_hash().

static hashval_t type_pair_hash ( const void *  item)
static

Definition at line 4295 of file gdbtypes.c.

References type_pair::old.

Referenced by create_copied_types_hash().

int types_deeply_equal ( struct type type1,
struct type type2 
)
int types_equal ( struct type a,
struct type b 
)

Variable Documentation

initialize_file_ftype _initialize_gdbtypes
const struct rank BASE_CONVERSION_BADNESS = {2,0}

Badness of converting derived to base class.

Definition at line 59 of file gdbtypes.c.

const struct rank BASE_PTR_CONVERSION_BADNESS = {1,0}

Badness of converting a derived class pointer to a base class pointer.

Definition at line 53 of file gdbtypes.c.

const struct rank BOOL_CONVERSION_BADNESS = {3,0}

Badness of conversion to boolean.

Definition at line 58 of file gdbtypes.c.

Referenced by rank_one_type().

const struct cplus_struct_type cplus_struct_default = { }

The default value of TYPE_CPLUS_SPECIFIC(T) points to this shared static structure.

Definition at line 2577 of file gdbtypes.c.

struct obstack dont_print_type_obstack
static

Definition at line 3950 of file gdbtypes.c.

Referenced by recursive_dump_type().

const struct rank EXACT_MATCH_BADNESS = {0,0}

Badness of an exact match.

Definition at line 49 of file gdbtypes.c.

Referenced by compare_parameters(), and rank_one_type().

const struct rank FLOAT_CONVERSION_BADNESS = {2,0}

Badness of floating conversion.

Definition at line 55 of file gdbtypes.c.

Referenced by rank_one_type().

const struct rank FLOAT_PROMOTION_BADNESS = {1,0}

Badness of floating promotion.

Definition at line 52 of file gdbtypes.c.

Referenced by rank_one_type().

const struct floatformat* floatformats_arm_ext[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_arm_ext_big,
&floatformat_arm_ext_littlebyte_bigword
}

Definition at line 90 of file gdbtypes.c.

Referenced by arm_ext_type(), and tdesc_gdb_type().

const struct floatformat* floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_i387_ext,
&floatformat_i387_ext
}

Definition at line 82 of file gdbtypes.c.

Referenced by i386_gdbarch_init(), ia64_gdbarch_init(), and tdesc_gdb_type().

const struct floatformat* floatformats_ia64_quad[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_ia64_quad_big,
&floatformat_ia64_quad_little
}

Definition at line 98 of file gdbtypes.c.

Referenced by aarch64_gdbarch_init(), hppa_gdbarch_init(), ia64_openvms_init_abi(), mips_linux_init_abi(), and s390_gdbarch_init().

const struct floatformat* floatformats_ia64_spill[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_ia64_spill_big,
&floatformat_ia64_spill_little
}

Definition at line 94 of file gdbtypes.c.

const struct floatformat* floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_ibm_long_double_big,
&floatformat_ibm_long_double_little
}

Definition at line 110 of file gdbtypes.c.

Referenced by do_ppc_sysv_return_value(), mips_gdbarch_init(), ppc64_sysv_abi_push_freg(), ppc64_sysv_abi_return_value_base(), and ppc_sysv_abi_push_dummy_call().

const struct floatformat* floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
const struct floatformat* floatformats_ieee_double_littlebyte_bigword[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_ieee_double_big,
&floatformat_ieee_double_littlebyte_bigword
}

Definition at line 78 of file gdbtypes.c.

Referenced by arm_gdbarch_init().

const struct floatformat* floatformats_ieee_half[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_ieee_half_big,
&floatformat_ieee_half_little
}

Definition at line 66 of file gdbtypes.c.

Referenced by build_opencl_types(), and verify_gdbarch().

const struct floatformat* floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
const struct floatformat* floatformats_m68881_ext[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_m68881_ext,
&floatformat_m68881_ext
}

Definition at line 86 of file gdbtypes.c.

Referenced by m68881_ext_type(), and m68k_gdbarch_init().

const struct floatformat* floatformats_vax_d[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_vax_d,
&floatformat_vax_d
}

Definition at line 106 of file gdbtypes.c.

Referenced by vax_gdbarch_init().

const struct floatformat* floatformats_vax_f[BFD_ENDIAN_UNKNOWN]
Initial value:
= {
&floatformat_vax_f,
&floatformat_vax_f
}

Definition at line 102 of file gdbtypes.c.

Referenced by vax_gdbarch_init().

struct gdbarch_data* gdbtypes_data
static

Definition at line 4763 of file gdbtypes.c.

const struct gnat_aux_type gnat_aux_default
Initial value:
=
{ NULL }

Definition at line 2593 of file gdbtypes.c.

const struct rank INCOMPATIBLE_TYPE_BADNESS = {100,0}

Badness if no conversion among types.

Definition at line 47 of file gdbtypes.c.

Referenced by classify_oload_match(), and rank_one_type().

const struct rank INT_FLOAT_CONVERSION_BADNESS = {2,0}

Badness of integer<->floating conversions.

Definition at line 56 of file gdbtypes.c.

Referenced by rank_one_type().

const struct rank INTEGER_CONVERSION_BADNESS = {2,0}

Badness of integral conversion.

Definition at line 54 of file gdbtypes.c.

Referenced by rank_one_type().

const struct rank INTEGER_PROMOTION_BADNESS = {1,0}

Badness of integral promotion.

Definition at line 51 of file gdbtypes.c.

Referenced by rank_one_type().

const struct rank LENGTH_MISMATCH_BADNESS = {100,0}

Badness if parameter list length doesn't match arg list length.

Definition at line 44 of file gdbtypes.c.

const struct rank NS_INTEGER_POINTER_CONVERSION_BADNESS = {3,0}

Badness of converting a (non-zero) integer constant to a pointer.

Definition at line 63 of file gdbtypes.c.

Referenced by rank_one_type().

const struct rank NS_POINTER_CONVERSION_BADNESS = {10,0}

Converting a pointer to an int is usually OK.

Definition at line 62 of file gdbtypes.c.

Referenced by classify_oload_match(), and rank_one_type().

const struct rank NULL_POINTER_CONVERSION_BADNESS = {2,0}

Definition at line 61 of file gdbtypes.c.

Referenced by rank_one_type().

const struct objfile_data* objfile_type_data
static

Definition at line 4906 of file gdbtypes.c.

int opaque_type_resolution = 1
static

Definition at line 117 of file gdbtypes.c.

Referenced by _initialize_gdbtypes(), and check_typedef().

unsigned int overload_debug = 0

Definition at line 122 of file gdbtypes.c.

Referenced by _initialize_gdbtypes(), find_oload_champ(), and rank_one_type().

const struct rank REFERENCE_CONVERSION_BADNESS = {2,0}

Badness of converting from non-reference to reference.

Definition at line 60 of file gdbtypes.c.

int strict_type_checking = 1
static

Definition at line 126 of file gdbtypes.c.

Referenced by _initialize_gdbtypes(), and rank_one_type().

const struct rank TOO_FEW_PARAMS_BADNESS = {100,0}

Dummy badness value for nonexistent parameter positions.

Definition at line 46 of file gdbtypes.c.

const struct rank VOID_PTR_CONVERSION_BADNESS = {2,0}

Badness of conversion of pointer to void pointer.

Definition at line 57 of file gdbtypes.c.

Referenced by rank_one_type().