44 const struct rank LENGTH_MISMATCH_BADNESS = {100,0};
46 const struct rank TOO_FEW_PARAMS_BADNESS = {100,0};
47 const struct rank INCOMPATIBLE_TYPE_BADNESS = {100,0};
49 const struct rank EXACT_MATCH_BADNESS = {0,0};
51 const struct rank INTEGER_PROMOTION_BADNESS = {1,0};
52 const struct rank FLOAT_PROMOTION_BADNESS = {1,0};
53 const struct rank BASE_PTR_CONVERSION_BADNESS = {1,0};
54 const struct rank INTEGER_CONVERSION_BADNESS = {2,0};
55 const struct rank FLOAT_CONVERSION_BADNESS = {2,0};
56 const struct rank INT_FLOAT_CONVERSION_BADNESS = {2,0};
57 const struct rank VOID_PTR_CONVERSION_BADNESS = {2,0};
58 const struct rank BOOL_CONVERSION_BADNESS = {3,0};
59 const struct rank BASE_CONVERSION_BADNESS = {2,0};
60 const struct rank REFERENCE_CONVERSION_BADNESS = {2,0};
61 const struct rank NULL_POINTER_CONVERSION_BADNESS = {2,0};
62 const struct rank NS_POINTER_CONVERSION_BADNESS = {10,0};
63 const struct rank NS_INTEGER_POINTER_CONVERSION_BADNESS = {3,0};
67 &floatformat_ieee_half_big,
68 &floatformat_ieee_half_little
71 &floatformat_ieee_single_big,
72 &floatformat_ieee_single_little
75 &floatformat_ieee_double_big,
76 &floatformat_ieee_double_little
79 &floatformat_ieee_double_big,
80 &floatformat_ieee_double_littlebyte_bigword
83 &floatformat_i387_ext,
87 &floatformat_m68881_ext,
88 &floatformat_m68881_ext
91 &floatformat_arm_ext_big,
92 &floatformat_arm_ext_littlebyte_bigword
95 &floatformat_ia64_spill_big,
96 &floatformat_ia64_spill_little
99 &floatformat_ia64_quad_big,
100 &floatformat_ia64_quad_little
111 &floatformat_ibm_long_double_big,
112 &floatformat_ibm_long_double_little
136 "(if set before loading symbols) is %s.\n"),
201 type = XCNEW (
struct type);
267 type = XCNEW (
struct type);
318 else if (*typeptr == 0)
325 if (typeptr == 0 || *typeptr == 0)
355 while (chain != ntype)
391 else if (*typeptr == 0)
398 if (typeptr == 0 || *typeptr == 0)
428 while (chain != ntype)
456 if (typeptr == 0 || *typeptr == 0)
494 struct type **param_types)
501 if (param_types[nparams - 1] == NULL)
518 for (i = 0; i < nparams; ++i)
533 if (!strcmp (space_identifier,
"code"))
535 else if (!strcmp (space_identifier,
"data"))
543 error (
_(
"Unknown address space specifier: \"%s\""), space_identifier);
570 struct type *storage)
581 while (ntype != type);
653 struct type **typeptr)
667 if (typeptr && *typeptr != NULL)
685 typeptr ? *typeptr : NULL);
767 while (ntype != chain);
829 if (result_type == NULL)
956 *highp = (*highp - 1) | *highp;
1062 struct type *element_type,
1063 struct type *range_type,
1064 unsigned int bit_stride)
1066 if (result_type == NULL)
1073 LONGEST low_bound, high_bound;
1076 low_bound = high_bound = 0;
1081 if (high_bound < low_bound)
1083 else if (bit_stride > 0)
1085 (bit_stride * (high_bound - low_bound + 1) + 7) / 8;
1088 TYPE_LENGTH (element_type) * (high_bound - low_bound + 1);
1120 struct type *element_type,
1121 struct type *range_type)
1133 struct type *range_type
1153 struct type *string_char_type,
1154 struct type *range_type)
1167 struct type *result_type;
1170 low_bound, high_bound);
1178 if (result_type == NULL)
1187 LONGEST low_bound, high_bound, bit_length;
1190 low_bound = high_bound = 0;
1191 bit_length = high_bound - low_bound + 1;
1208 struct type *inner_array, *elt_type;
1213 inner_array = array_type;
1231 struct type *array_type;
1259 return TYPE_MAIN_TYPE (type)->type_specific.func_stuff->self_type;
1286 TYPE_MAIN_TYPE (type)->type_specific.func_stuff->self_type = self_type;
1306 struct type *to_type)
1343 struct type *to_type,
struct field *args,
1344 int nargs,
int varargs)
1382 struct type *saved_type =
type;
1394 error (
_(
"Invalid anonymous type %s [in module %s], GCC PR debug/47510 bug?"),
1395 name ? name :
"<anonymous>",
1418 error (
_(
"No type named %s."), name);
1425 char *uns = alloca (strlen (name) + 10);
1427 strcpy (uns,
"unsigned ");
1428 strcpy (uns + 9, name);
1437 char *uns = alloca (strlen (name) + 8);
1439 strcpy (uns,
"signed ");
1440 strcpy (uns + 7, name);
1460 error (
_(
"No struct type named %s."), name);
1464 error (
_(
"This context has class, union or enum %s, not a struct."),
1482 error (
_(
"No union type named %s."), name);
1490 error (
_(
"This context has class, struct or enum %s, not a union."),
1505 error (
_(
"No enum type named %s."), name);
1509 error (
_(
"This context has class, struct or union %s, not an enum."),
1523 char *nam = (
char *)
1524 alloca (strlen (name) + strlen (
TYPE_NAME (type)) + 4);
1535 error (
_(
"No template type named %s."), name);
1539 error (
_(
"This context has class, union or enum %s, not a struct."),
1577 error (
_(
"Type %s is not a structure or union type."), type_name);
1589 if (type_name != NULL && strcmp (type_name, name) == 0)
1598 if (t_field_name && (
strcmp_iw (t_field_name, name) == 0))
1602 else if (!t_field_name || *t_field_name ==
'\0')
1604 struct type *subtype
1607 if (subtype != NULL)
1631 error (
_(
"Type %s has no component named %s."), type_name, name);
1648 *max = ((((
ULONGEST) 1 << (n - 1)) - 1) << 1) | 1;
1665 *max = ((
ULONGEST) 1 << (n - 1)) - 1;
1752 struct type *basetype;
1765 *basetypep = basetype;
1864 static struct type *
1869 struct type *static_range_type, *static_target_type;
1909 &low_bound, &high_bound);
1911 return static_range_type;
1918 static struct type *
1923 struct type *elt_type;
1924 struct type *range_type;
1925 struct type *ary_dim;
1941 elt_type, range_type,
1949 static struct type *
1953 struct type *resolved_type;
1955 unsigned int max_len = 0;
1981 return resolved_type;
1988 static struct type *
1992 struct type *resolved_type;
1994 unsigned resolved_type_bit_length = 0;
2008 unsigned new_bit_length;
2022 error (
_(
"Cannot determine struct field location"
2023 " (invalid location kind)"));
2028 pinfo.
next = addr_stack;
2049 if (new_bit_length > resolved_type_bit_length)
2050 resolved_type_bit_length = new_bit_length;
2060 return resolved_type;
2065 static struct type *
2071 struct type *resolved_type =
type;
2098 if (addr_stack->
valaddr != NULL)
2102 pinfo.
next = addr_stack;
2137 return resolved_type;
2159 while (node != NULL)
2219 struct type *orig_type =
type;
2274 if ((instance_flags & ALL_SPACES) != 0)
2275 new_instance_flags &= ~ALL_SPACES;
2276 if ((instance_flags & ALL_CLASSES) != 0)
2277 new_instance_flags &= ~ALL_CLASSES;
2279 instance_flags |= new_instance_flags;
2290 && opaque_type_resolution
2294 struct type *newtype;
2356 struct type *range_type;
2381 static struct type *
2384 struct ui_file *saved_gdb_stderr;
2426 DMGL_PARAMS | DMGL_ANSI);
2427 char *argtypetext, *p;
2428 int depth = 0, argcount = 1;
2429 struct field *argtypes;
2434 p = strchr (demangled_name,
'(');
2438 if (demangled_name == NULL || p == NULL)
2439 error (
_(
"Internal: Cannot demangle mangled name `%s'."),
2447 if (*p ==
'(' || *p ==
'<')
2451 else if (*p ==
')' || *p ==
'>')
2455 else if (*p ==
',' && depth == 0)
2469 argtypes = (
struct field *)
2488 if (depth <= 0 && (*p ==
',' || *p ==
')'))
2492 if (strncmp (argtypetext,
"...", p - argtypetext) != 0
2493 && strncmp (argtypetext,
"void", p - argtypetext) != 0)
2495 argtypes[argcount].
type =
2499 argtypetext = p + 1;
2502 if (*p ==
'(' || *p ==
'<')
2506 else if (*p ==
')' || *p ==
'>')
2522 argtypes, argcount, p[-2] ==
'.');
2526 xfree (demangled_name);
2542 int j, found_stub = 0;
2544 for (j = 0; j <
len; j++)
2562 char dem_opname[256];
2566 dem_opname, DMGL_ANSI);
2655 if (name && strcmp (name,
"char") == 0)
2739 LONGEST low_bound, high_bound;
2754 for (i = 0; i < n; i++)
2857 const gdb_byte *valaddr,
int embedded_offset,
2883 *offset = this_offset;
2886 else if (this_offset == *offset)
2896 embedded_offset + this_offset,
2926 c.
rank = a.rank + b.rank;
2927 c.
subrank = a.subrank + b.subrank;
2969 short found_pos = 0;
2970 short found_neg = 0;
2977 for (i = 0; i < a->
length; i++)
3010 struct value **args,
int nargs)
3014 int min_len = nparms < nargs ? nparms : nargs;
3018 bv->
rank = XNEWVEC (
struct rank, nargs + 1);
3028 ? LENGTH_MISMATCH_BADNESS
3029 : EXACT_MATCH_BADNESS;
3032 for (i = 1; i <= min_len; i++)
3037 for (i = min_len + 1; i <= nargs; i++)
3038 bv->
rank[i] = TOO_FEW_PARAMS_BADNESS;
3050 int first_p, second_p;
3054 first_p = (strstr (first,
"short") != NULL);
3055 second_p = (strstr (second,
"short") != NULL);
3056 if (first_p && second_p)
3058 if (first_p || second_p)
3062 first_p = (strstr (first,
"long") != NULL);
3063 second_p = (strstr (second,
"long") != NULL);
3064 if (first_p && second_p)
3066 if (first_p || second_p)
3070 first_p = (strstr (first,
"char") != NULL);
3071 second_p = (strstr (second,
"char") != NULL);
3072 if (first_p && second_p)
3074 if (first_p || second_p)
3165 if (s == NULL && t != NULL)
3167 else if (s != NULL && t == NULL)
3169 else if (s == NULL && t== NULL)
3171 return strcmp (s, t) == 0;
3256 || memcmp (block1->
data, block2->
data, block1->
size) != 0)
3262 "%d by check_types_equal"),
3306 bcache_full (&entry,
sizeof (entry), cache, &added);
3379 struct rank rank = {0,0};
3382 return EXACT_MATCH_BADNESS;
3394 REFERENCE_CONVERSION_BADNESS));
3397 REFERENCE_CONVERSION_BADNESS));
3401 "------ Arg is %s [%d], parm is %s [%d]\n",
3424 return sum_ranks (BASE_PTR_CONVERSION_BADNESS, rank);
3446 if (!strict_type_checking)
3699 return sum_ranks (BASE_CONVERSION_BADNESS, rank);
3763 for (bitno = 0; bitno < nbits; bitno++)
3765 if ((bitno % 8) == 0)
3769 if (
B_TST (bits, bitno))
3787 for (i = 0; i < nargs; i++)
3790 args[i].
name != NULL ? args[i].
name :
"<NULL>");
3818 for (method_idx = 0; method_idx <
TYPE_NFN_FIELDS (type); method_idx++)
3828 for (overload_idx = 0;
3905 "private_field_bits (%d bits at *",
3917 "protected_field_bits (%d bits at *",
3941 if (descriptive_type == NULL)
3963 struct type **first_dont_print
3966 int i = (
struct type **)
3971 if (type == first_dont_print[i])
4198 "[%d] enumval %s type ",
4202 "[%d] bitpos %d bitsize %d type ",
4224 ?
" (undefined)" :
"");
4299 return htab_hash_pointer (pair->
old);
4305 const struct type_pair *lhs = item_lhs, *rhs = item_rhs;
4307 return lhs->
old == rhs->old;
4332 while (*node_ptr != NULL)
4336 node_copy = obstack_copy (objfile_obstack, *node_ptr,
4338 node_copy->
prop = (*node_ptr)->prop;
4339 *node_ptr = node_copy;
4341 node_ptr = &node_copy->
next;
4355 htab_t copied_types)
4369 slot = htab_find_slot (copied_types, &pair, INSERT);
4371 return ((
struct type_pair *) *slot)->newobj;
4404 for (i = 0; i < nfields; i++)
4437 _(
"Unexpected type field location kind: %d"),
4553 int bit,
int unsigned_p,
char *
name)
4560 if (name && strcmp (name,
"char") == 0)
4572 int bit,
int unsigned_p,
char *
name)
4589 int bit,
int unsigned_p,
char *
name)
4607 int bit,
char *
name,
const struct floatformat **floatformats)
4614 gdb_assert (floatformats[0] != NULL && floatformats[1] != NULL);
4615 bit = floatformats[0]->totalsize;
4629 char *
name,
struct type *target_type)
4707 memset (f, 0,
sizeof f[0]);
4788 1,
"unsigned char");
4794 1,
"unsigned short");
4806 1,
"unsigned long");
4812 1,
"unsigned long long");
4894 "<internal function>");
4913 = objfile_data (objfile, objfile_type_data);
4919 1,
struct objfile_type);
4938 "signed char", objfile);
4942 "unsigned char", objfile);
4946 0,
"short", objfile);
4950 TYPE_FLAG_UNSIGNED,
"unsigned short", objfile);
4958 TYPE_FLAG_UNSIGNED,
"unsigned int", objfile);
4962 0,
"long", objfile);
4966 TYPE_FLAG_UNSIGNED,
"unsigned long", objfile);
4970 0,
"long long", objfile);
4974 TYPE_FLAG_UNSIGNED,
"unsigned long long", objfile);
4979 0,
"float", objfile);
4985 0,
"double", objfile);
4991 0,
"long double", objfile);
5003 "<text variable, no debug info>", objfile);
5008 "<text gnu-indirect-function variable, no debug info>",
5014 "<text from jump slot in .got.plt, no debug info>",
5021 "<data variable, no debug info>", objfile);
5024 "<variable (not text or data), no debug info>", objfile);
5028 "<thread local variable, no debug info>", objfile);
5052 TYPE_FLAG_UNSIGNED,
"__CORE_ADDR", objfile);
5054 set_objfile_data (objfile, objfile_type_data, objfile_type);
5064 objfile_type_data = register_objfile_data ();
5067 _(
"Set debugging of C++ overloading."),
5068 _(
"Show debugging of C++ overloading."),
5069 _(
"When enabled, ranking of the "
5070 "functions is displayed."),
5077 &opaque_type_resolution,
5078 _(
"Set resolution of opaque struct/class/union"
5079 " types (if set before loading symbols)."),
5080 _(
"Show resolution of opaque struct/class/union"
5081 " types (if set before loading symbols)."),
5088 &strict_type_checking,
5089 _(
"Set strict type checking."),
5090 _(
"Show strict type checking."),
const struct rank INCOMPATIBLE_TYPE_BADNESS
void set_type_vptr_basetype(struct type *type, struct type *basetype)
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n)
const struct floatformat * floatformats_vax_f[BFD_ENDIAN_UNKNOWN]
#define TYPE_GNAT_SPECIFIC(thistype)
int address_space_name_to_int(struct gdbarch *gdbarch, char *space_identifier)
#define TYPE_RANGE_DATA(thistype)
struct type * builtin_declong
struct cmd_list_element * setchecklist
struct type * lookup_string_range_type(struct type *string_char_type, LONGEST low_bound, LONGEST high_bound)
struct type * lookup_array_range_type(struct type *element_type, LONGEST low_bound, LONGEST high_bound)
static struct type * make_qualified_type(struct type *type, int new_flags, struct type *storage)
struct symbol * lookup_symbol_in_language(const char *name, const struct block *block, const domain_enum domain, enum language lang, struct field_of_this_result *is_a_field_of_this)
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
#define TYPE_DYN_PROP_LIST(thistype)
static struct obstack dont_print_type_obstack
int class_or_union_p(const struct type *t)
#define TYPE_OBJFILE_OWNED(t)
const struct floatformat ** gdbarch_double_format(struct gdbarch *gdbarch)
#define OBSTACK_CALLOC(OBSTACK, NUMBER, TYPE)
static struct type * resolve_dynamic_type_internal(struct type *type, struct property_addr_info *addr_stack, int top_level)
struct type * copy_type(const struct type *type)
union dynamic_prop_data data
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
struct type * builtin_func_ptr
const struct rank NS_POINTER_CONVERSION_BADNESS
struct type * builtin_long_double
struct rank sum_ranks(struct rank a, struct rank b)
void add_setshow_zuinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct type * builtin_true_unsigned_char
#define TYPE_FIELD_PRIVATE_BITS(thistype)
struct type * builtin_void
struct type * lookup_signed_typename(const struct language_defn *language, struct gdbarch *gdbarch, const char *name)
int get_vptr_fieldno(struct type *type, struct type **basetypep)
static void print_bit_vector(B_TYPE *bits, int nbits)
void replace_type(struct type *ntype, struct type *type)
struct cmd_list_element * showchecklist
#define TYPE_FIELD_NAME(thistype, n)
struct type * builtin_unsigned_int
#define TYPE_N_BASECLASSES(thistype)
static struct gdbarch_data * gdbtypes_data
static struct type * safe_parse_type(struct gdbarch *gdbarch, char *p, int length)
static void * gdbtypes_post_init(struct gdbarch *gdbarch)
static int strict_type_checking
struct type * builtin_double_complex
#define TYPE_DYN_PROP_ADDR(dynprop)
#define TYPE_LOW_BOUND(range_type)
struct type * make_unqualified_type(struct type *type)
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
static struct type * resolve_dynamic_array(struct type *type, struct property_addr_info *addr_stack)
int strcmp_iw(const char *string1, const char *string2)
#define TYPE_NFN_FIELDS(thistype)
void dummy_obstack_deallocate(void *object, void *data)
struct type * arch_boolean_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
LONGEST value_as_long(struct value *val)
const char * type_name_no_tag_or_error(struct type *type)
int gdbarch_int_bit(struct gdbarch *gdbarch)
struct type * arch_flags_type(struct gdbarch *gdbarch, char *name, int length)
struct type * builtin_double
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_type)
struct type * internal_type_vptr_basetype(struct type *type)
struct type * builtin_long_double
void set_type_vptr_fieldno(struct type *type, int fieldno)
#define TYPE_NAME(thistype)
#define TYPE_FIELD_ARTIFICIAL(thistype, n)
#define INIT_CPLUS_SPECIFIC(type)
struct type * internal_type_self_type(struct type *type)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
static int opaque_type_resolution
const struct floatformat ** gdbarch_long_double_format(struct gdbarch *gdbarch)
const struct rank BOOL_CONVERSION_BADNESS
#define TYPE_HIGH_BOUND(range_type)
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, char *name, const struct floatformat **floatformats)
char * plongest(LONGEST l)
void ui_file_delete(struct ui_file *file)
struct type * arch_complex_type(struct gdbarch *gdbarch, char *name, struct type *target_type)
void * gdbarch_data(struct gdbarch *gdbarch, struct gdbarch_data *data)
#define FIELD_ARTIFICIAL(thisfld)
#define TYPE_FIELD_VIRTUAL_BITS(thistype)
struct ui_file * gdb_stdout
#define FIELD_DWARF_BLOCK(thisfld)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
#define TYPE_SPECIFIC_FIELD(thistype)
const struct objfile_type * objfile_type(struct objfile *objfile)
int currently_reading_symtab
#define SYMBOL_CLASS(symbol)
void internal_error(const char *file, int line, const char *fmt,...)
#define TYPE_IS_OPAQUE(thistype)
struct type * builtin_func_func
struct type * make_function_type(struct type *type, struct type **typeptr)
void append_flags_type_flag(struct type *type, int bitpos, char *name)
char * gdb_mangle_name(struct type *, int, int)
#define TYPE_FLOATFORMAT(thistype)
#define TYPE_HIGH_BOUND_UNDEFINED(range_type)
struct type * builtin_uint8
#define TYPE_FIELD_PROTECTED_BITS(thistype)
struct type * builtin_float
void smash_to_method_type(struct type *type, struct type *self_type, struct type *to_type, struct field *args, int nargs, int varargs)
const struct gdb_exception exception_none
static void check_stub_method(struct type *type, int method_id, int signature_id)
struct type * builtin_uint16
const struct floatformat * floatformats_ieee_half[BFD_ENDIAN_UNKNOWN]
static struct type * resolve_dynamic_union(struct type *type, struct property_addr_info *addr_stack)
#define TYPE_FN_FIELD_STATIC_P(thisfn, n)
struct type * make_pointer_type(struct type *type, struct type **typeptr)
static int is_scalar_type(struct type *type)
int gdbarch_long_bit(struct gdbarch *gdbarch)
struct type * arch_composite_type(struct gdbarch *gdbarch, char *name, enum type_code code)
#define TYPE_NO_RETURN(thistype)
int cplus_method_ptr_size(struct type *to_type)
const struct floatformat * floatformats_ia64_quad[BFD_ENDIAN_UNKNOWN]
enum language la_language
#define SET_FIELD_PHYSADDR(thisfld, addr)
struct type * nodebug_data_symbol
#define VEC_safe_push(T, V, O)
static void print_cplus_stuff(struct type *type, int spaces)
struct type * init_type(enum type_code code, int length, int flags, const char *name, struct objfile *objfile)
void append_composite_type_field_aligned(struct type *t, char *name, struct type *field, int alignment)
int is_public_ancestor(struct type *base, struct type *dclass)
const char * gdbarch_address_class_type_flags_to_name(struct gdbarch *gdbarch, int type_flags)
struct type_equality_entry type_equality_entry_d
struct type * builtin_short
struct type * builtin_core_addr
const gdb_byte * value_contents_for_printing(struct value *value)
const void * bcache_full(const void *addr, int length, struct bcache *bcache, int *added)
struct type * builtin_long_long
struct type * builtin_complex
#define FIELD_LOC_KIND(thisfld)
#define SET_FIELD_BITPOS(thisfld, bitpos)
struct type * builtin_long
#define TYPE_FIELD(thistype, n)
#define TYPE_DATA_LOCATION_KIND(thistype)
#define TYPE_FN_FIELD_ARGS(thisfn, n)
#define bits(obj, st, fn)
#define TYPE_PROTOTYPED(t)
#define TYPE_FIELD_ENUMVAL(thistype, n)
#define TYPE_FIELD_TYPE(thistype, n)
int can_dereference(struct type *t)
#define TYPE_DATA_LOCATION(thistype)
struct type * builtin_signed_char
struct type * builtin_int32
static int distance_to_ancestor(struct type *base, struct type *dclass, int is_public)
#define TYPE_FN_FIELD_VOLATILE(thisfn, n)
struct type * builtin_short
void printf_filtered(const char *format,...)
struct type * builtin_char16
#define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE)
#define TYPE_CODE_SPACE(t)
static struct type * new_type(char *)
const struct rank FLOAT_PROMOTION_BADNESS
const struct rank EXACT_MATCH_BADNESS
int internal_type_vptr_fieldno(struct type *type)
struct type * nodebug_text_gnu_ifunc_symbol
int gdbarch_char_signed(struct gdbarch *gdbarch)
struct type * arch_character_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
static const struct objfile_data * objfile_type_data
struct obstack objfile_obstack
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
int types_deeply_equal(struct type *type1, struct type *type2)
struct type * make_reference_type(struct type *type, struct type **typeptr)
struct type * create_string_type(struct type *result_type, struct type *string_char_type, struct type *range_type)
static struct type * alloc_type_instance(struct type *oldtype)
#define TYPE_VPTR_FIELDNO(thistype)
int discrete_position(struct type *type, LONGEST val, LONGEST *pos)
#define TYPE_INCOMPLETE(t)
struct type * lookup_typename(const struct language_defn *language, struct gdbarch *gdbarch, const char *name, const struct block *block, int noerr)
struct cmd_list_element * setlist
char * gdb_demangle(const char *name, int options)
struct type * builtin_int128
#define TYPE_INSTANCE_FLAGS(thistype)
#define TYPE_FN_FIELD_PHYSNAME(thisfn, n)
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 int integer_types_same_name_p(const char *first, const char *second)
enum dynamic_prop_node_kind prop_kind
struct type * builtin_decdouble
struct type * check_typedef(struct type *type)
#define TYPE_GNU_IFUNC(t)
struct type * builtin_unsigned_long_long
#define CATCH(EXCEPTION, MASK)
#define TYPE_FN_FIELD_PRIVATE(thisfn, n)
const struct floatformat * floatformats_m68881_ext[BFD_ENDIAN_UNKNOWN]
struct type * builtin_unsigned_long
struct type * create_set_type(struct type *result_type, struct type *domain_type)
struct type * builtin_char32
#define TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED(arraytype)
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)
#define TYPE_MAIN_TYPE(thistype)
void allocate_cplus_struct_type(struct type *type)
struct type * make_restrict_type(struct type *type)
const struct rank INTEGER_CONVERSION_BADNESS
struct type * lookup_memberptr_type(struct type *type, struct type *domain)
static void print_gnat_stuff(struct type *type, int spaces)
struct type * lookup_transparent_type(const char *name)
void initialize_file_ftype(void)
static int compare_maybe_null_strings(const char *s, const char *t)
int field_is_static(struct field *f)
struct type * alloc_type_copy(const struct type *type)
const struct floatformat * floatformats_vax_d[BFD_ENDIAN_UNKNOWN]
int compare_badness(struct badness_vector *a, struct badness_vector *b)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static void show_opaque_type_resolution(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
#define TYPE_DATA_SPACE(t)
struct type * lookup_struct(const char *name, const struct block *block)
int gdbarch_address_class_name_to_type_flags_p(struct gdbarch *gdbarch)
#define TYPE_DYN_PROP_KIND(dynprop)
struct ui_file * ui_file_new(void)
static void show_overload_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct field * append_composite_type_field_raw(struct type *t, char *name, struct type *field)
struct type * builtin_char
int is_ancestor(struct type *base, struct type *dclass)
struct cmd_list_element * showlist
const struct floatformat * floatformats_ieee_double_littlebyte_bigword[BFD_ENDIAN_UNKNOWN]
void puts_filtered(const char *string)
const struct floatformat * floatformats_ia64_spill[BFD_ENDIAN_UNKNOWN]
#define gdb_assert_not_reached(message)
int is_integral_type(struct type *t)
struct type * builtin_int16
#define ALLOCATE_CPLUS_STRUCT_TYPE(type)
struct type * builtin_unsigned_long
struct type * nodebug_tls_symbol
struct type * lookup_enum(const char *name, const struct block *block)
void complaint(struct complaints **complaints, const char *fmt,...)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
struct dwarf2_per_cu_data * per_cu
struct type * copy_type_recursive(struct objfile *objfile, struct type *type, htab_t copied_types)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
const struct rank NS_INTEGER_POINTER_CONVERSION_BADNESS
struct type * parse_and_eval_type(char *p, int length)
struct bcache * bcache_xmalloc(unsigned long(*hash_function)(const void *, int length), int(*compare_function)(const void *, const void *, int length))
struct type * init_vector_type(struct type *elt_type, int n)
#define TYPE_TARGET_STUB(t)
static void show_strict_type_checking(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct type * builtin_int0
struct gdbarch * get_type_arch(const struct type *type)
const struct floatformat * floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN]
struct type * builtin_uint32
struct type * alloc_type(struct objfile *objfile)
#define TYPE_ADDRESS_CLASS_ALL(t)
void get_signed_type_minmax(struct type *type, LONGEST *min, LONGEST *max)
static void smash_type(struct type *type)
const struct rank FLOAT_CONVERSION_BADNESS
int gdbarch_double_bit(struct gdbarch *gdbarch)
struct type * builtin_decfloat
struct type * nodebug_got_plt_symbol
struct type * builtin_long
static int startswith(const char *string, const char *pattern)
htab_t create_copied_types_hash(struct objfile *objfile)
struct property_addr_info * next
struct type * lookup_union(const char *name, const struct block *block)
void add_dyn_prop(enum dynamic_prop_node_kind prop_kind, struct dynamic_prop prop, struct type *type, struct objfile *objfile)
unsigned int overload_debug
#define SET_FIELD_ENUMVAL(thisfld, enumval)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
struct type * builtin_unsigned_char
int class_types_same_p(const struct type *a, const struct type *b)
#define TYPE_BASECLASS(thistype, index)
struct type * arch_integer_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
struct cmd_list_element * setdebuglist
#define TYPE_FIELDS(thistype)
#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype)
#define TYPE_ADDRESS_CLASS_1(t)
void printfi_filtered(int spaces, const char *format,...)
const struct rank INT_FLOAT_CONVERSION_BADNESS
struct badness_vector * rank_function(struct type **parms, int nparms, struct value **args, int nargs)
const char * objfile_name(const struct objfile *objfile)
#define FIELD_BITSIZE(thisfld)
#define TYPE_TAIL_CALL_LIST(thistype)
int baseclass_offset(struct type *type, int index, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
void get_unsigned_type_max(struct type *type, ULONGEST *max)
#define TYPE_FIELD_BITSIZE(thistype, n)
struct type * builtin_bool
struct type * builtin_uint128
static int has_static_range(const struct range_bounds *bounds)
struct type * builtin_unsigned_long_long
struct type * lookup_struct_elt_type(struct type *type, const char *name, int noerr)
struct type * builtin_signed_char
static int is_dynamic_type_internal(struct type *type, int top_level)
struct type * builtin_unsigned_short
#define TYPE_FIELD_BITPOS(thistype, n)
#define TYPE_STUB_SUPPORTED(t)
struct type * builtin_string
struct type * builtin_int
int gdbarch_address_class_name_to_type_flags(struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
void smash_to_memberptr_type(struct type *type, struct type *self_type, struct type *to_type)
struct type * builtin_unsigned_short
const struct rank VOID_PTR_CONVERSION_BADNESS
#define TYPE_FN_FIELD_VOFFSET(thisfn, n)
struct type * get_target_type(struct type *type)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
struct type * alloc_type_arch(struct gdbarch *gdbarch)
void * hashtab_obstack_allocate(void *data, size_t size, size_t count)
struct type * create_array_type_with_stride(struct type *result_type, struct type *element_type, struct type *range_type, unsigned int bit_stride)
PTR xrealloc(PTR ptr, size_t size)
struct type * nodebug_unknown_symbol
static void print_args(struct field *args, int nargs, int spaces)
DEF_VEC_O(type_equality_entry_d)
void throw_exception(struct gdb_exception exception)
#define TYPE_CHAIN(thistype)
int types_equal(struct type *a, struct type *b)
void smash_to_methodptr_type(struct type *type, struct type *to_type)
#define TYPE_FN_FIELD_TYPE(thisfn, n)
void allocate_gnat_aux_type(struct type *type)
void append_composite_type_field(struct type *t, char *name, struct type *field)
const struct floatformat * floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]
struct type * make_cv_type(int cnst, int voltl, struct type *type, struct type **typeptr)
struct type * builtin_char
#define TYPE_TARGET_TYPE(thistype)
#define TYPE_RAW_CPLUS_SPECIFIC(thistype)
void gdb_print_host_address(const void *addr, struct ui_file *stream)
struct type * builtin_double
#define TYPE_FN_FIELD_FCONTEXT(thisfn, n)
struct type * internal_fn
struct type * lookup_template_type(char *name, struct type *type, const struct block *block)
#define TYPE_FN_FIELD_PROTECTED(thisfn, n)
#define TYPE_REFERENCE_TYPE(thistype)
void set_type_self_type(struct type *type, struct type *self_type)
#define TYPE_CODE(thistype)
struct rank rank_one_type(struct type *parm, struct type *arg, struct value *value)
const char * address_space_int_to_name(struct gdbarch *gdbarch, int space_flag)
#define TYPE_INDEX_TYPE(type)
struct type * builtin_true_char
struct type * resolve_dynamic_type(struct type *type, const gdb_byte *valaddr, CORE_ADDR addr)
struct ui_file * gdb_stderr
#define TYPE_FIXED_INSTANCE(t)
struct type * builtin_data_ptr
#define TYPE_CALLING_CONVENTION(thistype)
struct complaints * symfile_complaints
int gdbarch_long_long_bit(struct gdbarch *gdbarch)
#define FIELD_ENUMVAL(thisfld)
void recursive_dump_type(struct type *type, int spaces)
#define OBJSTAT(objfile, expr)
struct symbol * lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
#define HAVE_CPLUS_STRUCT(type)
#define INIT_GNAT_SPECIFIC(type)
#define TYPE_VPTR_BASETYPE(thistype)
#define TYPE_NFIELDS(thistype)
int gdbarch_float_bit(struct gdbarch *gdbarch)
struct type * make_type_with_address_space(struct type *type, int space_flag)
struct type * lookup_unsigned_typename(const struct language_defn *language, struct gdbarch *gdbarch, const char *name)
#define TYPE_FN_FIELD_CONST(thisfn, n)
static void dump_fn_fieldlists(struct type *type, int spaces)
#define CHECK_TYPEDEF(TYPE)
#define TYPE_ADDRESS_CLASS_2(t)
void check_stub_method_group(struct type *type, int method_id)
struct type * nodebug_text_symbol
#define TYPE_TAG_NAME(type)
#define TYPE_LOW_BOUND_UNDEFINED(range_type)
void bcache_xfree(struct bcache *bcache)
static void stub_noname_complaint(void)
#define TYPE_CPLUS_SPECIFIC(thistype)
initialize_file_ftype _initialize_gdbtypes
enum dynamic_prop_kind kind
struct dynamic_prop * get_dyn_prop(enum dynamic_prop_node_kind prop_kind, const struct type *type)
#define FIELD_NAME(thisfld)
int dwarf2_evaluate_property(const struct dynamic_prop *prop, struct property_addr_info *addr_stack, CORE_ADDR *value)
unsigned long long ULONGEST
#define BASETYPE_VIA_PUBLIC(thistype, index)
struct type * builtin_long_long
int value_embedded_offset(struct value *value)
static int check_types_equal(struct type *type1, struct type *type2, VEC(type_equality_entry_d)**worklist)
struct type * builtin_unsigned_int
int is_dynamic_type(struct type *type)
struct type * lookup_function_type_with_arguments(struct type *type, int nparams, struct type **param_types)
struct type * value_type(const struct value *value)
static struct type * resolve_dynamic_range(struct type *dyn_range_type, struct property_addr_info *addr_stack)
struct type * builtin_int64
#define TYPE_ALLOC(t, size)
#define SYMBOL_TYPE(symbol)
struct type * allocate_stub_method(struct type *type)
struct type * lookup_reference_type(struct type *type)
const struct rank INTEGER_PROMOTION_BADNESS
struct cmd_list_element * showdebuglist
const struct floatformat ** gdbarch_float_format(struct gdbarch *gdbarch)
int is_unique_ancestor(struct type *base, struct value *val)
#define TYPE_FN_FIELDLISTS(thistype)
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n)
struct type * lookup_methodptr_type(struct type *to_type)
#define TYPE_FN_FIELDLIST_NAME(thistype, n)
#define OBSTACK_ZALLOC(OBSTACK, TYPE)
const char * type_name_no_tag(const struct type *type)
#define TYPE_LENGTH(thistype)
struct type * make_atomic_type(struct type *type)
#define TYPE_ZALLOC(t, size)
static int check_types_worklist(VEC(type_equality_entry_d)**worklist, struct bcache *cache)
#define FIELD_STATIC_PHYSADDR(thisfld)
#define TYPE_POINTER_TYPE(thistype)
#define TYPE_FN_FIELDLIST_LENGTH(thistype, n)
int compare_ranks(struct rank a, struct rank b)
#define FIELD_BITPOS(thisfld)
#define INIT_FUNC_SPECIFIC(type)
struct type * arch_type(struct gdbarch *gdbarch, enum type_code code, int length, char *name)
struct type * builtin_uint64
CORE_ADDR read_memory_typed_address(CORE_ADDR addr, struct type *type)
static struct type * resolve_dynamic_struct(struct type *type, struct property_addr_info *addr_stack)
int gdbarch_long_double_bit(struct gdbarch *gdbarch)
#define TYPE_FIELD_LOC_KIND(thistype, n)
char * type_to_string(struct type *type)
struct type * builtin_int8
const struct floatformat * floatformats_arm_ext[BFD_ENDIAN_UNKNOWN]
#define TYPE_DECLARED_CLASS(t)
CORE_ADDR value_address(const struct value *value)
int gdbarch_short_bit(struct gdbarch *gdbarch)
#define TYPE_DESCRIPTIVE_TYPE(thistype)
#define TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL
int get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
int gdbarch_address_class_type_flags_to_name_p(struct gdbarch *gdbarch)
struct type * builtin_void
int is_scalar_type_recursive(struct type *t)
int get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
static hashval_t type_pair_hash(const void *item)
#define FIELD_STATIC_PHYSNAME(thisfld)
#define TYPE_SELF_TYPE(thistype)
void make_vector_type(struct type *array_type)
void error(const char *fmt,...)
static struct dynamic_prop_list * copy_dynamic_prop_list(struct obstack *objfile_obstack, struct dynamic_prop_list *list)
struct gdbarch_data * gdbarch_data_register_post_init(gdbarch_data_post_init_ftype *post_init)
static int type_pair_eq(const void *item_lhs, const void *item_rhs)
const struct rank NULL_POINTER_CONVERSION_BADNESS
struct type * lookup_pointer_type(struct type *type)
#define TYPE_FN_FIELDLIST1(thistype, n)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
struct dynamic_prop_list * next
#define FIELD_TYPE(thisfld)
struct type * builtin_unsigned_char
struct type * builtin_error
struct type * lookup_function_type(struct type *type)
enum return_reason reason
struct type * builtin_float
#define SET_FIELD_PHYSNAME(thisfld, name)
struct type * builtin_int
const ULONGEST const LONGEST len
#define TYPE_FN_FIELD_STUB(thisfn, n)