GDB (API)
Functions | Variables
/home/stan/gdb/src/gdb/gdbtypes.c File Reference
#include "defs.h"
#include "gdb_string.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 "gdb_assert.h"
#include "hashtab.h"
#include "exceptions.h"
#include "cp-support.h"

Go to the source code of this file.

Functions

struct typealloc_type (struct objfile *objfile)
struct typealloc_type_arch (struct gdbarch *gdbarch)
struct typealloc_type_copy (const struct type *type)
struct gdbarch * get_type_arch (const 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)
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)
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, LONGEST low_bound, LONGEST high_bound)
int get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
int get_array_bounds (struct type *type, LONGEST *low_bound, LONGEST *high_bound)
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)
void smash_to_memberptr_type (struct type *type, struct type *domain, 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 *domain, 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)
int get_vptr_fieldno (struct type *type, struct type **basetypep)
struct typecheck_typedef (struct type *type)
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)
int is_scalar_type_recursive (struct type *t)
int class_types_same_p (const struct type *a, const struct type *b)
int is_ancestor (struct type *base, struct type *dclass)
int is_public_ancestor (struct type *base, struct type *dclass)
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)
int types_equal (struct type *a, struct type *b)
struct rank rank_one_type (struct type *parm, struct type *arg, struct value *value)
int field_is_static (struct field *f)
void recursive_dump_type (struct type *type, int spaces)
htab_t create_copied_types_hash (struct objfile *objfile)
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 field * append_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)
struct builtin_typebuiltin_type (struct gdbarch *gdbarch)
struct objfile_typeobjfile_type (struct objfile *objfile)
void _initialize_gdbtypes (void)

Variables

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

Function Documentation

void _initialize_gdbtypes ( void  )

Definition at line 4103 of file gdbtypes.c.

const char* address_space_int_to_name ( struct gdbarch *  gdbarch,
int  space_flag 
)

Definition at line 537 of file gdbtypes.c.

int address_space_name_to_int ( struct gdbarch *  gdbarch,
char *  space_identifier 
)

Definition at line 515 of file gdbtypes.c.

struct type* alloc_type ( struct objfile objfile) [read]

Definition at line 165 of file gdbtypes.c.

struct type* alloc_type_arch ( struct gdbarch *  gdbarch) [read]

Definition at line 194 of file gdbtypes.c.

struct type* alloc_type_copy ( const struct type type) [read]

Definition at line 222 of file gdbtypes.c.

void allocate_cplus_struct_type ( struct type type)

Definition at line 1925 of file gdbtypes.c.

void allocate_gnat_aux_type ( struct type type)

Definition at line 1945 of file gdbtypes.c.

struct type* allocate_stub_method ( struct type type) [read]

Definition at line 771 of file gdbtypes.c.

void append_composite_type_field ( struct type t,
char *  name,
struct type field 
)

Definition at line 3803 of file gdbtypes.c.

void append_composite_type_field_aligned ( struct type t,
char *  name,
struct type field,
int  alignment 
)

Definition at line 3763 of file gdbtypes.c.

struct field* append_composite_type_field_raw ( struct type t,
char *  name,
struct type field 
) [read]

Definition at line 3744 of file gdbtypes.c.

void append_flags_type_flag ( struct type type,
int  bitpos,
char *  name 
)

Definition at line 3706 of file gdbtypes.c.

struct type* arch_boolean_type ( struct gdbarch *  gdbarch,
int  bit,
int  unsigned_p,
char *  name 
) [read]

Definition at line 3634 of file gdbtypes.c.

struct type* arch_character_type ( struct gdbarch *  gdbarch,
int  bit,
int  unsigned_p,
char *  name 
) [read]

Definition at line 3617 of file gdbtypes.c.

struct type* arch_complex_type ( struct gdbarch *  gdbarch,
char *  name,
struct type target_type 
) [read]

Definition at line 3674 of file gdbtypes.c.

struct type* arch_composite_type ( struct gdbarch *  gdbarch,
char *  name,
enum type_code  code 
) [read]

Definition at line 3728 of file gdbtypes.c.

struct type* arch_flags_type ( struct gdbarch *  gdbarch,
char *  name,
int  length 
) [read]

Definition at line 3689 of file gdbtypes.c.

struct type* arch_float_type ( struct gdbarch *  gdbarch,
int  bit,
char *  name,
const struct floatformat **  floatformats 
) [read]

Definition at line 3652 of file gdbtypes.c.

struct type* arch_integer_type ( struct gdbarch *  gdbarch,
int  bit,
int  unsigned_p,
char *  name 
) [read]

Definition at line 3598 of file gdbtypes.c.

struct type* arch_type ( struct gdbarch *  gdbarch,
enum type_code  code,
int  length,
char *  name 
) [read]

Definition at line 3578 of file gdbtypes.c.

struct builtin_type* builtin_type ( struct gdbarch *  gdbarch) [read]

Definition at line 3812 of file gdbtypes.c.

int can_dereference ( struct type t)

Definition at line 2022 of file gdbtypes.c.

void check_stub_method_group ( struct type type,
int  method_id 
)

Definition at line 1883 of file gdbtypes.c.

struct type* check_typedef ( struct type type) [read]

Definition at line 1523 of file gdbtypes.c.

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

Definition at line 2113 of file gdbtypes.c.

int compare_badness ( struct badness_vector a,
struct badness_vector b 
)

Definition at line 2300 of file gdbtypes.c.

int compare_ranks ( struct rank  a,
struct rank  b 
)

Definition at line 2272 of file gdbtypes.c.

struct type* copy_type ( const struct type type) [read]

Definition at line 3557 of file gdbtypes.c.

struct type* copy_type_recursive ( struct objfile objfile,
struct type type,
htab_t  copied_types 
) [read]

Definition at line 3426 of file gdbtypes.c.

struct type* create_array_type ( struct type result_type,
struct type element_type,
struct type range_type 
) [read]

Definition at line 942 of file gdbtypes.c.

htab_t create_copied_types_hash ( struct objfile objfile)

Definition at line 3412 of file gdbtypes.c.

struct type* create_range_type ( struct type result_type,
struct type index_type,
LONGEST  low_bound,
LONGEST  high_bound 
) [read]

Definition at line 795 of file gdbtypes.c.

struct type* create_set_type ( struct type result_type,
struct type domain_type 
) [read]

Definition at line 1026 of file gdbtypes.c.

struct type* create_string_type ( struct type result_type,
struct type string_char_type,
struct type range_type 
) [read]

Definition at line 1002 of file gdbtypes.c.

int field_is_static ( struct field *  f)

Definition at line 2906 of file gdbtypes.c.

int get_array_bounds ( struct type type,
LONGEST low_bound,
LONGEST high_bound 
)

Definition at line 901 of file gdbtypes.c.

int get_discrete_bounds ( struct type type,
LONGEST lowp,
LONGEST highp 
)

Definition at line 822 of file gdbtypes.c.

struct gdbarch* get_type_arch ( const struct type type) [read]

Definition at line 234 of file gdbtypes.c.

int get_vptr_fieldno ( struct type type,
struct type **  basetypep 
)

Definition at line 1445 of file gdbtypes.c.

struct type* init_type ( enum type_code  code,
int  length,
int  flags,
const char *  name,
struct objfile objfile 
) [read]

Definition at line 1960 of file gdbtypes.c.

struct type* init_vector_type ( struct type elt_type,
int  n 
) [read]

Definition at line 1079 of file gdbtypes.c.

int is_ancestor ( struct type base,
struct type dclass 
)

Definition at line 2173 of file gdbtypes.c.

int is_integral_type ( struct type t)

Definition at line 2034 of file gdbtypes.c.

int is_public_ancestor ( struct type base,
struct type dclass 
)

Definition at line 2182 of file gdbtypes.c.

Definition at line 2072 of file gdbtypes.c.

int is_unique_ancestor ( struct type base,
struct value *  val 
)

Definition at line 2242 of file gdbtypes.c.

struct type* lookup_array_range_type ( struct type element_type,
LONGEST  low_bound,
LONGEST  high_bound 
) [read]

Definition at line 978 of file gdbtypes.c.

struct type* lookup_enum ( const char *  name,
const struct block block 
) [read]

Definition at line 1296 of file gdbtypes.c.

struct type* lookup_function_type ( struct type type) [read]

Definition at line 469 of file gdbtypes.c.

struct type* lookup_function_type_with_arguments ( struct type type,
int  nparams,
struct type **  param_types 
) [read]

Definition at line 479 of file gdbtypes.c.

struct type* lookup_memberptr_type ( struct type type,
struct type domain 
) [read]

Definition at line 743 of file gdbtypes.c.

struct type* lookup_methodptr_type ( struct type to_type) [read]

Definition at line 755 of file gdbtypes.c.

struct type* lookup_pointer_type ( struct type type) [read]

Definition at line 355 of file gdbtypes.c.

struct type* lookup_reference_type ( struct type type) [read]

Definition at line 428 of file gdbtypes.c.

struct type* lookup_signed_typename ( const struct language_defn language,
struct gdbarch *  gdbarch,
const char *  name 
) [read]

Definition at line 1231 of file gdbtypes.c.

struct type* lookup_string_range_type ( struct type string_char_type,
LONGEST  low_bound,
LONGEST  high_bound 
) [read]

Definition at line 1014 of file gdbtypes.c.

struct type* lookup_struct ( const char *  name,
const struct block block 
) [read]

Definition at line 1250 of file gdbtypes.c.

struct type* lookup_struct_elt_type ( struct type type,
const char *  name,
int  noerr 
) [read]

Definition at line 1356 of file gdbtypes.c.

struct type* lookup_template_type ( char *  name,
struct type type,
const struct block block 
) [read]

Definition at line 1317 of file gdbtypes.c.

struct type* lookup_typename ( const struct language_defn language,
struct gdbarch *  gdbarch,
const char *  name,
const struct block block,
int  noerr 
) [read]

Definition at line 1199 of file gdbtypes.c.

struct type* lookup_union ( const char *  name,
const struct block block 
) [read]

Definition at line 1272 of file gdbtypes.c.

struct type* lookup_unsigned_typename ( const struct language_defn language,
struct gdbarch *  gdbarch,
const char *  name 
) [read]

Definition at line 1220 of file gdbtypes.c.

struct type* make_cv_type ( int  cnst,
int  voltl,
struct type type,
struct type **  typeptr 
) [read]

Definition at line 638 of file gdbtypes.c.

struct type* make_function_type ( struct type type,
struct type **  typeptr 
) [read]

Definition at line 439 of file gdbtypes.c.

struct type* make_pointer_type ( struct type type,
struct type **  typeptr 
) [read]

Definition at line 293 of file gdbtypes.c.

struct type* make_reference_type ( struct type type,
struct type **  typeptr 
) [read]

Definition at line 366 of file gdbtypes.c.

struct type* make_restrict_type ( struct type type) [read]

Definition at line 683 of file gdbtypes.c.

struct type* make_type_with_address_space ( struct type type,
int  space_flag 
) [read]

Definition at line 614 of file gdbtypes.c.

void make_vector_type ( struct type array_type)

Definition at line 1056 of file gdbtypes.c.

struct objfile_type* objfile_type ( struct objfile objfile) [read]

Definition at line 3951 of file gdbtypes.c.

struct badness_vector* rank_function ( struct type **  parms,
int  nparms,
struct value **  args,
int  nargs 
) [read]

Definition at line 2344 of file gdbtypes.c.

struct rank rank_one_type ( struct type parm,
struct type arg,
struct value *  value 
) [read]

Definition at line 2495 of file gdbtypes.c.

void recursive_dump_type ( struct type type,
int  spaces 
)

Definition at line 3051 of file gdbtypes.c.

void replace_type ( struct type ntype,
struct type type 
)

Definition at line 702 of file gdbtypes.c.

void smash_to_memberptr_type ( struct type type,
struct type domain,
struct type to_type 
)

Definition at line 1100 of file gdbtypes.c.

void smash_to_method_type ( struct type type,
struct type domain,
struct type to_type,
struct field *  args,
int  nargs,
int  varargs 
)

Definition at line 1137 of file gdbtypes.c.

void smash_to_methodptr_type ( struct type type,
struct type to_type 
)

Definition at line 1120 of file gdbtypes.c.

struct rank sum_ranks ( struct rank  a,
struct rank  b 
) [read]

Definition at line 2258 of file gdbtypes.c.

const char* type_name_no_tag ( const struct type type)

Definition at line 1156 of file gdbtypes.c.

const char* type_name_no_tag_or_error ( struct type type)

Definition at line 1175 of file gdbtypes.c.

int types_equal ( struct type a,
struct type b 
)

Definition at line 2420 of file gdbtypes.c.


Variable Documentation

struct rank BASE_CONVERSION_BADNESS = {2,0}

Definition at line 59 of file gdbtypes.c.

Definition at line 53 of file gdbtypes.c.

struct rank BOOL_CONVERSION_BADNESS = {3,0}

Definition at line 58 of file gdbtypes.c.

Definition at line 1922 of file gdbtypes.c.

struct rank EXACT_MATCH_BADNESS = {0,0}

Definition at line 49 of file gdbtypes.c.

Definition at line 55 of file gdbtypes.c.

struct rank FLOAT_PROMOTION_BADNESS = {1,0}

Definition at line 52 of file gdbtypes.c.

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.

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

Definition at line 82 of file gdbtypes.c.

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.

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.

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.

struct floatformat* floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
Initial value:
 {
  &floatformat_ieee_double_big,
  &floatformat_ieee_double_little
}

Definition at line 74 of file gdbtypes.c.

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.

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.

struct floatformat* floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
Initial value:
 {
  &floatformat_ieee_single_big,
  &floatformat_ieee_single_little
}

Definition at line 70 of file gdbtypes.c.

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

Definition at line 86 of file gdbtypes.c.

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

Definition at line 106 of file gdbtypes.c.

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

Definition at line 102 of file gdbtypes.c.

Initial value:
  { NULL }

Definition at line 1937 of file gdbtypes.c.

struct rank INCOMPATIBLE_TYPE_BADNESS = {100,0}

Definition at line 47 of file gdbtypes.c.

Definition at line 56 of file gdbtypes.c.

Definition at line 54 of file gdbtypes.c.

Definition at line 51 of file gdbtypes.c.

struct rank LENGTH_MISMATCH_BADNESS = {100,0}

Definition at line 44 of file gdbtypes.c.

Definition at line 63 of file gdbtypes.c.

Definition at line 62 of file gdbtypes.c.

Definition at line 61 of file gdbtypes.c.

unsigned int overload_debug = 0

Definition at line 122 of file gdbtypes.c.

Definition at line 60 of file gdbtypes.c.

struct rank TOO_FEW_PARAMS_BADNESS = {100,0}

Definition at line 46 of file gdbtypes.c.

Definition at line 57 of file gdbtypes.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines