23#if !defined (GDBTYPES_H)
48#include "gdbsupport/array-view.h"
49#include "gdbsupport/gdb-hashtab.h"
50#include "gdbsupport/gdb_optional.h"
51#include "gdbsupport/offset-type.h"
52#include "gdbsupport/enum-flags.h"
53#include "gdbsupport/underlying.h"
54#include "gdbsupport/print-utils.h"
55#include "gdbsupport/function-view.h"
57#include "gdbsupport/gdb_obstack.h"
71#define B_SET(a,x) ((a)[(x)>>3] |= (1 << ((x)&7)))
72#define B_CLR(a,x) ((a)[(x)>>3] &= ~(1 << ((x)&7)))
73#define B_TST(a,x) ((a)[(x)>>3] & (1 << ((x)&7)))
74#define B_TYPE unsigned char
75#define B_BYTES(x) ( 1 + ((x)>>3) )
76#define B_CLRALL(a,x) memset ((a), 0, B_BYTES(x))
86#include "type-codes.def"
112#define TYPE_NOTTEXT(t) (((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_NOTTEXT)
117#define TYPE_CONST(t) ((((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_CONST) != 0)
122#define TYPE_VOLATILE(t) \
123 ((((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_VOLATILE) != 0)
128#define TYPE_RESTRICT(t) \
129 ((((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_RESTRICT) != 0)
134#define TYPE_ATOMIC(t) \
135 ((((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_ATOMIC) != 0)
139#define TYPE_IS_REFERENCE(t) \
140 ((t)->code () == TYPE_CODE_REF || (t)->code () == TYPE_CODE_RVALUE_REF)
143#define TYPE_IS_ALLOCATABLE(t) \
144 ((t)->dyn_prop (DYN_PROP_ALLOCATED) != NULL)
147#define TYPE_HAS_VARIANT_PARTS(t) \
148 ((t)->dyn_prop (DYN_PROP_VARIANT_PARTS) != nullptr)
151#define TYPE_HAS_DYNAMIC_LENGTH(t) \
152 ((t)->dyn_prop (DYN_PROP_BYTE_SIZE) != nullptr)
173#define TYPE_CODE_SPACE(t) \
174 ((((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_CODE_SPACE) != 0)
176#define TYPE_DATA_SPACE(t) \
177 ((((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_DATA_SPACE) != 0)
186#define TYPE_ADDRESS_CLASS_1(t) (((t)->instance_flags ()) \
187 & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1)
188#define TYPE_ADDRESS_CLASS_2(t) (((t)->instance_flags ()) \
189 & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2)
190#define TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL \
191 (TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1 | TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2)
192#define TYPE_ADDRESS_CLASS_ALL(t) (((t)->instance_flags ()) \
193 & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL)
236 gdb::array_view<variant_part>
parts;
945#define TYPE_ALIGN_BITS 8
1067 switch (this->
code ())
1078 (
"type::bounds called on type with invalid code");
1598#define VOFFSET_STATIC 1
1819#define INIT_CPLUS_SPECIFIC(type) \
1820 (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_CPLUS_STUFF, \
1821 TYPE_RAW_CPLUS_SPECIFIC (type) = (struct cplus_struct_type*) \
1822 &cplus_struct_default)
1824#define ALLOCATE_CPLUS_STRUCT_TYPE(type) allocate_cplus_struct_type (type)
1826#define HAVE_CPLUS_STRUCT(type) \
1827 (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_CPLUS_STUFF \
1828 && TYPE_RAW_CPLUS_SPECIFIC (type) != &cplus_struct_default)
1830#define INIT_NONE_SPECIFIC(type) \
1831 (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_NONE, \
1832 TYPE_MAIN_TYPE (type)->type_specific = {})
1838#define INIT_GNAT_SPECIFIC(type) \
1839 (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_GNAT_STUFF, \
1840 TYPE_GNAT_SPECIFIC (type) = (struct gnat_aux_type *) &gnat_aux_default)
1841#define ALLOCATE_GNAT_AUX_TYPE(type) allocate_gnat_aux_type (type)
1844#define HAVE_GNAT_AUX_INFO(type) \
1845 (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_GNAT_STUFF)
1848#define ADA_TYPE_P(type) \
1849 (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_GNAT_STUFF \
1850 || (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_NONE \
1851 && (type)->is_fixed_instance ()))
1853#define INIT_FUNC_SPECIFIC(type) \
1854 (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FUNC, \
1855 TYPE_MAIN_TYPE (type)->type_specific.func_stuff = (struct func_type *) \
1856 TYPE_ZALLOC (type, \
1857 sizeof (*TYPE_MAIN_TYPE (type)->type_specific.func_stuff)))
1862#define INIT_FIXED_POINT_SPECIFIC(type) \
1863 (TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_FIXED_POINT, \
1864 allocate_fixed_point_type_info (type))
1866#define TYPE_MAIN_TYPE(thistype) (thistype)->main_type
1867#define TYPE_POINTER_TYPE(thistype) (thistype)->pointer_type
1868#define TYPE_REFERENCE_TYPE(thistype) (thistype)->reference_type
1869#define TYPE_RVALUE_REFERENCE_TYPE(thistype) (thistype)->rvalue_reference_type
1870#define TYPE_CHAIN(thistype) (thistype)->chain
1874#define TYPE_RAW_ALIGN(thistype) type_raw_align (thistype)
1892#define TYPE_DATA_LOCATION(thistype) \
1893 ((thistype)->dyn_prop (DYN_PROP_DATA_LOCATION))
1894#define TYPE_DATA_LOCATION_BATON(thistype) \
1895 TYPE_DATA_LOCATION (thistype)->data.baton
1896#define TYPE_DATA_LOCATION_ADDR(thistype) \
1897 (TYPE_DATA_LOCATION (thistype)->const_val ())
1898#define TYPE_DATA_LOCATION_KIND(thistype) \
1899 (TYPE_DATA_LOCATION (thistype)->kind ())
1900#define TYPE_DYNAMIC_LENGTH(thistype) \
1901 ((thistype)->dyn_prop (DYN_PROP_BYTE_SIZE))
1904#define TYPE_ALLOCATED_PROP(thistype) \
1905 ((thistype)->dyn_prop (DYN_PROP_ALLOCATED))
1906#define TYPE_ASSOCIATED_PROP(thistype) \
1907 ((thistype)->dyn_prop (DYN_PROP_ASSOCIATED))
1908#define TYPE_RANK_PROP(thistype) \
1909 ((thistype)->dyn_prop (DYN_PROP_RANK))
1913#define TYPE_SELF_TYPE(thistype) internal_type_self_type (thistype)
1922#define TYPE_VPTR_FIELDNO(thistype) internal_type_vptr_fieldno (thistype)
1923#define TYPE_VPTR_BASETYPE(thistype) internal_type_vptr_basetype (thistype)
1925#define TYPE_NFN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields
1926#define TYPE_SPECIFIC_FIELD(thistype) \
1927 TYPE_MAIN_TYPE(thistype)->type_specific_field
1933#define TYPE_CPLUS_SPECIFIC(thistype) \
1934 (!HAVE_CPLUS_STRUCT(thistype) \
1935 ? (struct cplus_struct_type*)&cplus_struct_default \
1936 : TYPE_RAW_CPLUS_SPECIFIC(thistype))
1937#define TYPE_RAW_CPLUS_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.cplus_stuff
1938#define TYPE_CPLUS_CALLING_CONVENTION(thistype) \
1939 TYPE_MAIN_TYPE(thistype)->type_specific.cplus_stuff->calling_convention
1940#define TYPE_FLOATFORMAT(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.floatformat
1941#define TYPE_GNAT_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.gnat_stuff
1942#define TYPE_DESCRIPTIVE_TYPE(thistype) TYPE_GNAT_SPECIFIC(thistype)->descriptive_type
1943#define TYPE_CALLING_CONVENTION(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->calling_convention
1944#define TYPE_NO_RETURN(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->is_noreturn
1945#define TYPE_TAIL_CALL_LIST(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->tail_call_list
1946#define TYPE_BASECLASS(thistype,index) ((thistype)->field (index).type ())
1947#define TYPE_N_BASECLASSES(thistype) TYPE_CPLUS_SPECIFIC(thistype)->n_baseclasses
1948#define TYPE_BASECLASS_NAME(thistype,index) (thistype->field (index).name ())
1949#define TYPE_BASECLASS_BITPOS(thistype,index) (thistype->field (index).loc_bitpos ())
1950#define BASETYPE_VIA_PUBLIC(thistype, index) \
1951 ((!TYPE_FIELD_PRIVATE(thistype, index)) && (!TYPE_FIELD_PROTECTED(thistype, index)))
1952#define TYPE_CPLUS_DYNAMIC(thistype) TYPE_CPLUS_SPECIFIC (thistype)->is_dynamic
1954#define BASETYPE_VIA_VIRTUAL(thistype, index) \
1955 (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
1956 : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index)))
1958#define TYPE_FIELD_PRIVATE_BITS(thistype) \
1959 TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits
1960#define TYPE_FIELD_PROTECTED_BITS(thistype) \
1961 TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits
1962#define TYPE_FIELD_IGNORE_BITS(thistype) \
1963 TYPE_CPLUS_SPECIFIC(thistype)->ignore_field_bits
1964#define TYPE_FIELD_VIRTUAL_BITS(thistype) \
1965 TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits
1966#define SET_TYPE_FIELD_PRIVATE(thistype, n) \
1967 B_SET (TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits, (n))
1968#define SET_TYPE_FIELD_PROTECTED(thistype, n) \
1969 B_SET (TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits, (n))
1970#define SET_TYPE_FIELD_IGNORE(thistype, n) \
1971 B_SET (TYPE_CPLUS_SPECIFIC(thistype)->ignore_field_bits, (n))
1972#define SET_TYPE_FIELD_VIRTUAL(thistype, n) \
1973 B_SET (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n))
1974#define TYPE_FIELD_PRIVATE(thistype, n) \
1975 (TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits == NULL ? 0 \
1976 : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits, (n)))
1977#define TYPE_FIELD_PROTECTED(thistype, n) \
1978 (TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits == NULL ? 0 \
1979 : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits, (n)))
1980#define TYPE_FIELD_IGNORE(thistype, n) \
1981 (TYPE_CPLUS_SPECIFIC(thistype)->ignore_field_bits == NULL ? 0 \
1982 : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->ignore_field_bits, (n)))
1983#define TYPE_FIELD_VIRTUAL(thistype, n) \
1984 (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \
1985 : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n)))
1987#define TYPE_FN_FIELDLISTS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists
1988#define TYPE_FN_FIELDLIST(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n]
1989#define TYPE_FN_FIELDLIST1(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].fn_fields
1990#define TYPE_FN_FIELDLIST_NAME(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].name
1991#define TYPE_FN_FIELDLIST_LENGTH(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].length
1993#define TYPE_N_TEMPLATE_ARGUMENTS(thistype) \
1994 TYPE_CPLUS_SPECIFIC (thistype)->n_template_arguments
1995#define TYPE_TEMPLATE_ARGUMENTS(thistype) \
1996 TYPE_CPLUS_SPECIFIC (thistype)->template_arguments
1997#define TYPE_TEMPLATE_ARGUMENT(thistype, n) \
1998 TYPE_CPLUS_SPECIFIC (thistype)->template_arguments[n]
2000#define TYPE_FN_FIELD(thisfn, n) (thisfn)[n]
2001#define TYPE_FN_FIELD_PHYSNAME(thisfn, n) (thisfn)[n].physname
2002#define TYPE_FN_FIELD_TYPE(thisfn, n) (thisfn)[n].type
2003#define TYPE_FN_FIELD_ARGS(thisfn, n) (((thisfn)[n].type)->fields ())
2004#define TYPE_FN_FIELD_CONST(thisfn, n) ((thisfn)[n].is_const)
2005#define TYPE_FN_FIELD_VOLATILE(thisfn, n) ((thisfn)[n].is_volatile)
2006#define TYPE_FN_FIELD_PRIVATE(thisfn, n) ((thisfn)[n].is_private)
2007#define TYPE_FN_FIELD_PROTECTED(thisfn, n) ((thisfn)[n].is_protected)
2008#define TYPE_FN_FIELD_ARTIFICIAL(thisfn, n) ((thisfn)[n].is_artificial)
2009#define TYPE_FN_FIELD_STUB(thisfn, n) ((thisfn)[n].is_stub)
2010#define TYPE_FN_FIELD_CONSTRUCTOR(thisfn, n) ((thisfn)[n].is_constructor)
2011#define TYPE_FN_FIELD_FCONTEXT(thisfn, n) ((thisfn)[n].fcontext)
2012#define TYPE_FN_FIELD_VOFFSET(thisfn, n) ((thisfn)[n].voffset-2)
2013#define TYPE_FN_FIELD_VIRTUAL_P(thisfn, n) ((thisfn)[n].voffset > 1)
2014#define TYPE_FN_FIELD_STATIC_P(thisfn, n) ((thisfn)[n].voffset == VOFFSET_STATIC)
2015#define TYPE_FN_FIELD_DEFAULTED(thisfn, n) ((thisfn)[n].defaulted)
2016#define TYPE_FN_FIELD_DELETED(thisfn, n) ((thisfn)[n].is_deleted)
2019#define TYPE_TYPEDEF_FIELD_ARRAY(thistype) \
2020 TYPE_CPLUS_SPECIFIC (thistype)->typedef_field
2021#define TYPE_TYPEDEF_FIELD(thistype, n) \
2022 TYPE_CPLUS_SPECIFIC (thistype)->typedef_field[n]
2023#define TYPE_TYPEDEF_FIELD_NAME(thistype, n) \
2024 TYPE_TYPEDEF_FIELD (thistype, n).name
2025#define TYPE_TYPEDEF_FIELD_TYPE(thistype, n) \
2026 TYPE_TYPEDEF_FIELD (thistype, n).type
2027#define TYPE_TYPEDEF_FIELD_COUNT(thistype) \
2028 TYPE_CPLUS_SPECIFIC (thistype)->typedef_field_count
2029#define TYPE_TYPEDEF_FIELD_PROTECTED(thistype, n) \
2030 TYPE_TYPEDEF_FIELD (thistype, n).is_protected
2031#define TYPE_TYPEDEF_FIELD_PRIVATE(thistype, n) \
2032 TYPE_TYPEDEF_FIELD (thistype, n).is_private
2034#define TYPE_NESTED_TYPES_ARRAY(thistype) \
2035 TYPE_CPLUS_SPECIFIC (thistype)->nested_types
2036#define TYPE_NESTED_TYPES_FIELD(thistype, n) \
2037 TYPE_CPLUS_SPECIFIC (thistype)->nested_types[n]
2038#define TYPE_NESTED_TYPES_FIELD_NAME(thistype, n) \
2039 TYPE_NESTED_TYPES_FIELD (thistype, n).name
2040#define TYPE_NESTED_TYPES_FIELD_TYPE(thistype, n) \
2041 TYPE_NESTED_TYPES_FIELD (thistype, n).type
2042#define TYPE_NESTED_TYPES_COUNT(thistype) \
2043 TYPE_CPLUS_SPECIFIC (thistype)->nested_types_count
2044#define TYPE_NESTED_TYPES_FIELD_PROTECTED(thistype, n) \
2045 TYPE_NESTED_TYPES_FIELD (thistype, n).is_protected
2046#define TYPE_NESTED_TYPES_FIELD_PRIVATE(thistype, n) \
2047 TYPE_NESTED_TYPES_FIELD (thistype, n).is_private
2049#define TYPE_IS_OPAQUE(thistype) \
2050 ((((thistype)->code () == TYPE_CODE_STRUCT) \
2051 || ((thistype)->code () == TYPE_CODE_UNION)) \
2052 && ((thistype)->num_fields () == 0) \
2053 && (!HAVE_CPLUS_STRUCT (thistype) \
2054 || TYPE_NFN_FIELDS (thistype) == 0) \
2055 && ((thistype)->is_stub () || !(thistype)->stub_is_supported ()))
2060#define TYPE_SAFE_NAME(type) \
2061 (type->name () != nullptr ? type->name () : _("<unnamed type>"))
2066#define TYPE_ERROR_NAME(type) \
2067 (type->name () ? type->name () : _("<error type>"))
2215#define TYPE_ALLOC(t,size) \
2216 (obstack_alloc (((t)->is_objfile_owned () \
2217 ? &((t)->objfile_owner ()->objfile_obstack) \
2218 : gdbarch_obstack ((t)->arch_owner ())), \
2224#define TYPE_ZALLOC(t,size) (memset (TYPE_ALLOC (t, size), 0, size))
2249 : m_is_objfile (
true),
2284 m_is_objfile =
true;
2298 : m_is_objfile (
type->is_objfile_owned ()),
2332 bool m_is_objfile =
false;
2335 bool m_smash =
false;
2444 (
struct gdbarch *,
const char *);
2652 const struct block *);
2730#define REFERENCE_CONVERSION_RVALUE 1
2732#define REFERENCE_CONVERSION_CONST_LVALUE 2
2739#define CV_CONVERSION_CONST 1
2740#define CV_CONVERSION_VOLATILE 2
2758 gdb::array_view<value *> args);
type * new_type(enum type_code code, int bit, const char *name)
type_allocator(struct type *type, type_allocator_kind kind=SAME)
type_allocator(const struct type *type)
type_allocator(objfile *objfile, enum language lang)
type_allocator(gdbarch *gdbarch)
T extract_integer(gdb::array_view< const gdb_byte >, enum bfd_endian byte_order)
@ TYPE_SPECIFIC_FLOATFORMAT
@ TYPE_SPECIFIC_FIXED_POINT
@ TYPE_SPECIFIC_GNAT_STUFF
@ TYPE_SPECIFIC_SELF_TYPE
@ TYPE_SPECIFIC_CPLUS_STUFF
void recursive_dump_type(struct type *, int)
struct type * copy_type_recursive(struct type *type, htab_t copied_types)
struct type * check_typedef(struct type *)
const struct rank INTEGER_PROMOTION_BADNESS
int can_dereference(struct type *)
struct type * create_set_type(type_allocator &alloc, struct type *domain_type)
struct type * get_target_type(struct type *type)
struct type * make_function_type(struct type *, struct type **)
void smash_to_memberptr_type(struct type *, struct type *, struct type *)
enum bfd_endian type_byte_order(const struct type *type)
void allocate_gnat_aux_type(struct type *)
struct type * make_cv_type(int, int, struct type *, struct type **)
const struct floatformat * floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN]
struct type * init_character_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * init_integer_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
const struct rank BASE_PTR_CONVERSION_BADNESS
bool set_type_align(struct type *, ULONGEST)
void append_flags_type_flag(struct type *type, int bitpos, const char *name)
struct type * create_static_range_type(type_allocator &alloc, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
const struct rank LENGTH_MISMATCH_BADNESS
bool operator==(const dynamic_prop &l, const dynamic_prop &r)
bool types_equal(struct type *, struct type *)
struct type * lookup_typename(const struct language_defn *language, const char *name, const struct block *block, int noerr)
htab_up create_copied_types_hash()
const struct rank BOOL_CONVERSION_BADNESS
struct type * create_range_type(type_allocator &alloc, struct type *index_type, const struct dynamic_prop *low_bound, const struct dynamic_prop *high_bound, LONGEST bias)
void maintenance_print_type(const char *, int)
const struct rank NS_POINTER_CONVERSION_BADNESS
const struct rank FLOAT_PROMOTION_BADNESS
struct type * init_float_type(type_allocator &alloc, int bit, const char *name, const struct floatformat **floatformats, enum bfd_endian byte_order=BFD_ENDIAN_UNKNOWN)
const struct floatformat * floatformats_m68881_ext[BFD_ENDIAN_UNKNOWN]
struct type * make_reference_type(struct type *, struct type **, enum type_code)
#define TYPE_IS_REFERENCE(t)
const struct rank TOO_FEW_PARAMS_BADNESS
struct type * make_type_with_address_space(struct type *type, type_instance_flags space_identifier)
struct type * arch_composite_type(struct gdbarch *gdbarch, const char *name, enum type_code code)
int is_scalar_type(struct type *type)
struct type * lookup_reference_type(struct type *, enum type_code)
const struct rank NS_INTEGER_POINTER_CONVERSION_BADNESS
@ FIELD_LOC_KIND_PHYSNAME
@ FIELD_LOC_KIND_PHYSADDR
@ FIELD_LOC_KIND_DWARF_BLOCK
CORE_ADDR get_pointer_type_max(struct type *)
struct type * lookup_unsigned_typename(const struct language_defn *, const char *)
struct type * internal_type_self_type(struct type *)
int is_dynamic_type(struct type *type)
struct type * make_restrict_type(struct type *)
struct type * lookup_signed_typename(const struct language_defn *, const char *)
const struct rank INCOMPATIBLE_TYPE_BADNESS
void allocate_fixed_point_type_info(struct type *type)
struct type * init_decfloat_type(type_allocator &alloc, int bit, const char *name)
const struct floatformat * floatformat_from_type(const struct type *type)
const struct floatformat * floatformats_ieee_quad[BFD_ENDIAN_UNKNOWN]
const struct rank REFERENCE_SEE_THROUGH_BADNESS
@ TYPE_INSTANCE_FLAG_CODE_SPACE
@ TYPE_INSTANCE_FLAG_CONST
@ TYPE_INSTANCE_FLAG_VOLATILE
@ TYPE_INSTANCE_FLAG_ATOMIC
@ TYPE_INSTANCE_FLAG_DATA_SPACE
@ TYPE_INSTANCE_FLAG_RESTRICT
@ TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2
@ TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1
@ TYPE_INSTANCE_FLAG_NOTTEXT
bool get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
void replace_type(struct type *, struct type *)
DEF_ENUM_FLAGS_TYPE(enum type_instance_flag_value, type_instance_flags)
const struct floatformat * floatformats_ieee_double_littlebyte_bigword[BFD_ENDIAN_UNKNOWN]
const struct rank INT_FLOAT_CONVERSION_BADNESS
int is_public_ancestor(struct type *, struct type *)
gdb::optional< LONGEST > get_discrete_high_bound(struct type *type)
struct type * lookup_array_range_type(struct type *, LONGEST, LONGEST)
struct type * lookup_struct_elt_type(struct type *, const char *, int)
struct type * create_string_type(type_allocator &alloc, struct type *string_char_type, struct type *range_type)
struct type * lookup_string_range_type(struct type *, LONGEST, LONGEST)
void get_signed_type_minmax(struct type *, LONGEST *, LONGEST *)
void allocate_cplus_struct_type(struct type *)
struct type * resolve_dynamic_type(struct type *type, gdb::array_view< const gdb_byte > valaddr, CORE_ADDR addr, const frame_info_ptr *frame=nullptr)
struct type * lookup_rvalue_reference_type(struct type *)
const struct rank BASE_CONVERSION_BADNESS
void set_type_vptr_basetype(struct type *, struct type *)
struct type * arch_flags_type(struct gdbarch *gdbarch, const char *name, int bit)
struct type * create_range_type_with_stride(type_allocator &alloc, struct type *index_type, const struct dynamic_prop *low_bound, const struct dynamic_prop *high_bound, LONGEST bias, const struct dynamic_prop *stride, bool byte_stride_p)
badness_vector rank_function(gdb::array_view< type * > parms, gdb::array_view< value * > args)
struct type * lookup_function_type_with_arguments(struct type *, int, struct type **)
void print_scalar_formatted(const gdb_byte *, struct type *, const struct value_print_options *, int, struct ui_file *)
struct type * init_vector_type(struct type *elt_type, int n)
int is_floating_type(struct type *)
struct type * make_pointer_type(struct type *, struct type **)
gdb::optional< LONGEST > get_discrete_low_bound(struct type *type)
struct type * lookup_memberptr_type(struct type *, struct type *)
void append_flags_type_field(struct type *type, int start_bitpos, int nr_bits, struct type *field_type, const char *name)
struct type * init_complex_type(const char *, struct type *)
struct type * init_pointer_type(type_allocator &alloc, int bit, const char *name, struct type *target_type)
bool is_nocall_function(const struct type *type)
struct rank rank_one_type(struct type *, struct type *, struct value *)
int class_types_same_p(const struct type *, const struct type *)
struct type * internal_type_vptr_basetype(struct type *)
const struct floatformat * floatformats_bfloat16[BFD_ENDIAN_UNKNOWN]
const struct rank CV_CONVERSION_BADNESS
char * gdb_mangle_name(struct type *, int, int)
int compare_ranks(struct rank a, struct rank b)
int is_scalar_type_recursive(struct type *)
int internal_type_vptr_fieldno(struct type *)
struct type * lookup_template_type(const char *, struct type *, const struct block *)
void smash_to_method_type(struct type *type, struct type *self_type, struct type *to_type, struct field *args, int nargs, int varargs)
unsigned type_raw_align(struct type *)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
const struct rank REFERENCE_CONVERSION_BADNESS
int class_or_union_p(const struct type *)
struct type * init_fixed_point_type(type_allocator &, int, int, const char *)
void append_composite_type_field_aligned(struct type *t, const char *name, struct type *field, int alignment)
void set_type_vptr_fieldno(struct type *, int)
struct type * make_unqualified_type(struct type *)
struct type * lookup_function_type(struct type *)
struct type * lookup_methodptr_type(struct type *)
int is_integral_type(struct type *)
gdb::optional< LONGEST > discrete_position(struct type *type, LONGEST val)
int compare_badness(const badness_vector &, const badness_vector &)
struct type * make_atomic_type(struct type *)
struct type * lookup_lvalue_reference_type(struct type *)
bool get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
unsigned int overload_debug
const struct floatformat * floatformats_ia64_spill[BFD_ENDIAN_UNKNOWN]
struct type * lookup_pointer_type(struct type *)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
const struct floatformat * floatformats_arm_ext[BFD_ENDIAN_UNKNOWN]
struct type * create_array_type(type_allocator &alloc, struct type *element_type, struct type *range_type)
void check_stub_method_group(struct type *, int)
struct_elt lookup_struct_elt(struct type *, const char *, int)
int type_not_associated(const struct type *type)
unsigned type_align(struct type *)
unsigned int type_length_units(struct type *type)
void set_type_self_type(struct type *, struct type *)
struct type * create_array_type_with_stride(type_allocator &alloc, struct type *element_type, struct type *range_type, struct dynamic_prop *byte_stride_prop, unsigned int bit_stride)
bool can_create_complex_type(struct type *)
void smash_to_methodptr_type(struct type *, struct type *)
const struct rank INTEGER_CONVERSION_BADNESS
const char * address_space_type_instance_flags_to_name(struct gdbarch *, type_instance_flags)
struct field * append_composite_type_field_raw(struct type *t, const char *name, struct type *field)
const struct cplus_struct_type cplus_struct_default
const struct floatformat * floatformats_ieee_half[BFD_ENDIAN_UNKNOWN]
ULONGEST get_unsigned_type_max(struct type *)
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
const struct gnat_aux_type gnat_aux_default
int is_ancestor(struct type *, struct type *)
const struct rank NULL_POINTER_CONVERSION
void append_composite_type_field(struct type *t, const char *name, struct type *field)
int is_unique_ancestor(struct type *, struct value *)
const struct rank EXACT_MATCH_BADNESS
struct type * init_boolean_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
bool is_fixed_point_type(struct type *type)
std::vector< rank > badness_vector
int get_vptr_fieldno(struct type *, struct type **)
const struct rank FLOAT_CONVERSION_BADNESS
const struct floatformat * floatformats_vax_d[BFD_ENDIAN_UNKNOWN]
int type_not_allocated(const struct type *type)
const struct rank VOID_PTR_CONVERSION_BADNESS
const struct floatformat * floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]
type_instance_flags address_space_name_to_type_instance_flags(struct gdbarch *, const char *)
struct type * copy_type(const struct type *type)
const char * type_name_or_error(struct type *type)
void make_vector_type(struct type *array_type)
struct rank sum_ranks(struct rank a, struct rank b)
const struct floatformat * floatformats_vax_f[BFD_ENDIAN_UNKNOWN]
bool types_deeply_equal(struct type *, struct type *)
struct type * builtin_signed_char
struct type * builtin_declong
struct type * builtin_long_long
struct type * builtin_int0
struct type * nodebug_text_gnu_ifunc_symbol
struct type * internal_fn
struct type * builtin_uint16
struct type * builtin_error
struct type * builtin_int24
struct type * builtin_double
struct type * builtin_string
struct type * builtin_int8
struct type * builtin_func_ptr
struct type * builtin_core_addr
struct type * builtin_uint128
struct type * builtin_long
struct type * builtin_data_ptr
struct type * builtin_bool
struct type * builtin_true_unsigned_char
struct type * builtin_unsigned_char
struct type * nodebug_tls_symbol
struct type * builtin_complex
struct type * builtin_long_double
struct type * builtin_unsigned_long_long
struct type * builtin_uint32
struct type * builtin_uint64
struct type * builtin_char16
struct type * builtin_short
struct type * builtin_double_complex
struct type * builtin_int64
struct type * builtin_uint24
struct type * builtin_char
struct type * builtin_int
struct type * builtin_decfloat
struct type * builtin_int32
struct type * builtin_unsigned_short
struct type * builtin_wchar
struct type * builtin_unsigned_int
struct type * builtin_decdouble
struct type * builtin_char32
struct type * builtin_uint8
struct type * nodebug_got_plt_symbol
struct type * builtin_half
struct type * builtin_bfloat16
struct type * builtin_int128
struct type * builtin_unsigned_long
struct type * builtin_int16
struct type * builtin_void
struct type * builtin_float
struct type * nodebug_data_symbol
struct type * builtin_func_func
struct type * nodebug_unknown_symbol
struct type * builtin_true_char
struct type * nodebug_text_symbol
struct fn_fieldlist * fn_fieldlists
struct type * vptr_basetype
unsigned typedef_field_count
struct decl_field * nested_types
B_TYPE * virtual_field_bits
unsigned nested_types_count
__extension__ enum dwarf_calling_convention calling_convention
B_TYPE * private_field_bits
unsigned short n_template_arguments
struct symbol ** template_arguments
B_TYPE * protected_field_bits
struct decl_field * typedef_field
B_TYPE * ignore_field_bits
unsigned int is_protected
bool contains(ULONGEST value, bool is_unsigned) const
struct dynamic_prop_list * next
enum dynamic_prop_node_kind prop_kind
const dwarf2_property_baton * baton() const
void set_loclist(const dwarf2_property_baton *baton)
const char * variable_name() const
LONGEST const_val() const
dynamic_prop_kind kind() const
union dynamic_prop_data m_data
void set_original_type(struct type *original_type)
struct type * original_type() const
enum dynamic_prop_kind m_kind
const gdb::array_view< variant_part > * variant_parts() const
void set_variable_name(const char *name)
void set_locexpr(const dwarf2_property_baton *baton)
void set_addr_offset(const dwarf2_property_baton *baton)
void set_variant_parts(gdb::array_view< variant_part > *variant_parts)
void set_const_val(LONGEST const_val)
void set_type(struct type *type)
void set_loc_bitpos(LONGEST bitpos)
CORE_ADDR loc_physaddr() const
LONGEST loc_bitpos() const
void set_loc_physaddr(CORE_ADDR physaddr)
void set_is_artificial(bool is_artificial)
const char * loc_physname() const
unsigned int m_artificial
union field_location m_loc
void set_loc_dwarf_block(dwarf2_locexpr_baton *dwarf_block)
void set_loc_physname(const char *physname)
__extension__ enum field_loc_kind m_loc_kind
bool is_artificial() const
void set_bitsize(unsigned int bitsize)
field_loc_kind loc_kind() const
LONGEST loc_enumval() const
dwarf2_locexpr_baton * loc_dwarf_block() const
void set_loc_enumval(LONGEST enumval)
void set_name(const char *name)
const char * name() const
unsigned int bitsize() const
struct type * type() const
unsigned int is_artificial
__extension__ enum dwarf_defaulted_attribute defaulted
unsigned int is_constructor
unsigned int is_protected
struct fn_field * fn_fields
__extension__ enum dwarf_calling_convention calling_convention
struct call_site * tail_call_list
struct type * descriptive_type
unsigned int m_flag_prototyped
unsigned int m_flag_flag_enum
__extension__ enum language m_lang
unsigned int m_flag_fixed_instance
unsigned int m_multi_dimensional
unsigned int m_flag_vector
struct range_bounds * bounds
unsigned int m_flag_stub_supported
unsigned int m_flag_endianity_not_default
struct type * complex_type
unsigned int m_flag_target_stub
unsigned int m_flag_varargs
__extension__ enum type_specific_kind type_specific_field
struct type * m_target_type
unsigned int m_flag_unsigned
__extension__ enum type_code code
unsigned int m_flag_nosign
union type_specific type_specific
unsigned int m_flag_declared_class
union main_type::@1 flds_bnds
unsigned int m_flag_objfile_owned
unsigned int m_flag_gnu_ifunc
struct dynamic_prop_list * dyn_prop_list
struct dynamic_prop stride
unsigned int flag_upper_bound_is_count
ULONGEST bit_stride() const
unsigned int flag_is_byte_stride
unsigned int flag_bound_evaluated
struct type * target_type() const
dynamic_prop * dyn_prop(dynamic_prop_node_kind kind) const
void set_is_prototyped(bool is_prototyped)
void copy_fields(struct type *src)
void set_code(type_code code)
void remove_dyn_prop(dynamic_prop_node_kind kind)
void set_is_multi_dimensional(bool value)
bool is_fixed_instance() const
void set_endianity_is_not_default(bool endianity_is_not_default)
struct field & field(int idx) const
void set_has_no_signedness(bool has_no_signedness)
void set_instance_flags(type_instance_flags flags)
void set_index_type(type *index_type)
void set_target_type(struct type *target_type)
struct main_type * main_type
void set_is_unsigned(bool is_unsigned)
void set_is_stub(bool is_stub)
void set_is_declared_class(bool is_declared_class) const
struct type * rvalue_reference_type
gdbarch * arch_owner() const
void set_has_varargs(bool has_varargs)
void set_owner(objfile *objfile)
bool target_is_stub() const
bool endianity_is_not_default() const
bool is_gnu_ifunc() const
void copy_fields(std::vector< struct field > &src)
void set_fixed_point_info(struct fixed_point_type_info *info) const
void set_is_flag_enum(bool is_flag_enum)
struct type * pointer_type
void set_bounds(range_bounds *bounds)
enum language language() const
bool is_declared_class() const
bool has_no_signedness() const
struct objfile * objfile_owner() const
void add_dyn_prop(dynamic_prop_node_kind kind, dynamic_prop prop)
void set_num_fields(unsigned int num_fields)
unsigned int num_fields() const
void set_name(const char *name)
void set_is_vector(bool is_vector)
bool stub_is_supported() const
struct fixed_point_type_info & fixed_point_info() const
void set_is_gnu_ifunc(bool is_gnu_ifunc)
void alloc_fields(unsigned int nfields, bool init=true)
bool bit_size_differs_p() const
void set_owner(gdbarch *arch)
ULONGEST bit_stride() const
void set_length(ULONGEST length)
bool is_multi_dimensional() const
const gdb_mpq & fixed_point_scaling_factor()
struct field * fields() const
struct type * reference_type
bool is_pointer_or_reference() const
range_bounds * bounds() const
void set_is_fixed_instance(bool is_fixed_instance)
const char * name() const
type * index_type() const
struct type * fixed_point_type_base_type()
bool is_flag_enum() const
bool is_prototyped() const
void set_stub_is_supported(bool stub_is_supported)
const type_instance_flags instance_flags() const
unsigned m_instance_flags
unsigned short bit_offset() const
void set_fields(struct field *fields)
void set_target_is_stub(bool target_is_stub)
bool is_objfile_owned() const
unsigned short bit_size() const
gdb::array_view< variant > variants
bool matches(ULONGEST value, bool is_unsigned) const
gdb::array_view< variant_part > parts
gdb::array_view< discriminant_range > discriminants
const dwarf2_property_baton * baton
struct type * original_type
const char * variable_name
const gdb::array_view< variant_part > * variant_parts
struct dwarf2_locexpr_baton * dwarf_block
struct gnat_aux_type * gnat_stuff
struct fixed_point_type_info * fixed_point_info
const struct floatformat * floatformat
unsigned short bit_offset
struct cplus_struct_type * cplus_stuff
struct func_type * func_stuff
struct type_specific::@0 int_stuff