📄 gdbtypes.h
字号:
/* The number of methods with this name. */ int length; /* The list of methods. */ struct fn_field { /* The name after it has been processed */ char *physname; /* The return value of the method */ struct type *type; /* The argument list */ struct type **args; /* For virtual functions. First baseclass that defines this virtual function. */ struct type *fcontext; /* Attributes. */ unsigned int is_const : 1; unsigned int is_volatile : 1; unsigned int is_private : 1; unsigned int is_protected : 1; unsigned int is_stub : 1; unsigned int dummy : 3; /* Index into that baseclass's virtual function table, minus 2; else if static: VOFFSET_STATIC; else: 0. */ unsigned int voffset : 24;# define VOFFSET_STATIC 1 } *fn_fields; } *fn_fieldlists;};/* The default value of TYPE_CPLUS_SPECIFIC(T) points to the this shared static structure. */extern const struct cplus_struct_type cplus_struct_default;extern voidallocate_cplus_struct_type PARAMS ((struct type *));#define INIT_CPLUS_SPECIFIC(type) \ (TYPE_CPLUS_SPECIFIC(type)=(struct cplus_struct_type*)&cplus_struct_default)#define ALLOCATE_CPLUS_STRUCT_TYPE(type) allocate_cplus_struct_type (type)#define HAVE_CPLUS_STRUCT(type) \ (TYPE_CPLUS_SPECIFIC(type) != &cplus_struct_default)#define TYPE_NAME(thistype) (thistype)->name#define TYPE_TARGET_TYPE(thistype) (thistype)->target_type#define TYPE_POINTER_TYPE(thistype) (thistype)->pointer_type#define TYPE_REFERENCE_TYPE(thistype) (thistype)->reference_type#define TYPE_FUNCTION_TYPE(thistype) (thistype)->function_type#define TYPE_LENGTH(thistype) (thistype)->length#define TYPE_OBJFILE(thistype) (thistype)->objfile#define TYPE_FLAGS(thistype) (thistype)->flags#define TYPE_UNSIGNED(thistype) ((thistype)->flags & TYPE_FLAG_UNSIGNED)#define TYPE_CODE(thistype) (thistype)->code#define TYPE_NFIELDS(thistype) (thistype)->nfields#define TYPE_FIELDS(thistype) (thistype)->fields/* C++ */#define TYPE_VPTR_BASETYPE(thistype) (thistype)->vptr_basetype#define TYPE_DOMAIN_TYPE(thistype) (thistype)->vptr_basetype#define TYPE_VPTR_FIELDNO(thistype) (thistype)->vptr_fieldno#define TYPE_FN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fields#define TYPE_NFN_FIELDS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields#define TYPE_NFN_FIELDS_TOTAL(thistype) TYPE_CPLUS_SPECIFIC(thistype)->nfn_fields_total#define TYPE_TYPE_SPECIFIC(thistype) (thistype)->type_specific#define TYPE_ARG_TYPES(thistype) (thistype)->type_specific.arg_types#define TYPE_CPLUS_SPECIFIC(thistype) (thistype)->type_specific.cplus_stuff#define TYPE_BASECLASS(thistype,index) (thistype)->fields[index].type#define TYPE_N_BASECLASSES(thistype) TYPE_CPLUS_SPECIFIC(thistype)->n_baseclasses#define TYPE_BASECLASS_NAME(thistype,index) (thistype)->fields[index].name#define TYPE_BASECLASS_BITPOS(thistype,index) (thistype)->fields[index].bitpos#define BASETYPE_VIA_PUBLIC(thistype, index) (!TYPE_FIELD_PRIVATE(thistype, index))#define BASETYPE_VIA_VIRTUAL(thistype, index) \ B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (index))#define TYPE_FIELD(thistype, n) (thistype)->fields[n]#define TYPE_FIELD_TYPE(thistype, n) (thistype)->fields[n].type#define TYPE_FIELD_NAME(thistype, n) (thistype)->fields[n].name#define TYPE_FIELD_VALUE(thistype, n) (* (int*) &(thistype)->fields[n].type)#define TYPE_FIELD_BITPOS(thistype, n) (thistype)->fields[n].bitpos#define TYPE_FIELD_BITSIZE(thistype, n) (thistype)->fields[n].bitsize#define TYPE_FIELD_PACKED(thistype, n) (thistype)->fields[n].bitsize#define TYPE_FIELD_PRIVATE_BITS(thistype) \ TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits#define TYPE_FIELD_PROTECTED_BITS(thistype) \ TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits#define TYPE_FIELD_VIRTUAL_BITS(thistype) \ TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits#define SET_TYPE_FIELD_PRIVATE(thistype, n) \ B_SET (TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits, (n))#define SET_TYPE_FIELD_PROTECTED(thistype, n) \ B_SET (TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits, (n))#define SET_TYPE_FIELD_VIRTUAL(thistype, n) \ B_SET (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n))#define TYPE_FIELD_PRIVATE(thistype, n) \ (TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits == NULL ? 0 \ : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->private_field_bits, (n)))#define TYPE_FIELD_PROTECTED(thistype, n) \ (TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits == NULL ? 0 \ : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->protected_field_bits, (n)))#define TYPE_FIELD_VIRTUAL(thistype, n) \ B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n))#define TYPE_FIELD_STATIC(thistype, n) ((thistype)->fields[n].bitpos == -1)#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) ((char *)(thistype)->fields[n].bitsize)#define TYPE_FN_FIELDLISTS(thistype) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists#define TYPE_FN_FIELDLIST(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n]#define TYPE_FN_FIELDLIST1(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].fn_fields#define TYPE_FN_FIELDLIST_NAME(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].name#define TYPE_FN_FIELDLIST_LENGTH(thistype, n) TYPE_CPLUS_SPECIFIC(thistype)->fn_fieldlists[n].length#define TYPE_FN_FIELD(thisfn, n) (thisfn)[n]#define TYPE_FN_FIELD_PHYSNAME(thisfn, n) (thisfn)[n].physname#define TYPE_FN_FIELD_TYPE(thisfn, n) (thisfn)[n].type#define TYPE_FN_FIELD_ARGS(thisfn, n) TYPE_ARG_TYPES ((thisfn)[n].type)#define TYPE_FN_FIELD_CONST(thisfn, n) ((thisfn)[n].is_const)#define TYPE_FN_FIELD_VOLATILE(thisfn, n) ((thisfn)[n].is_volatile)#define TYPE_FN_FIELD_PRIVATE(thisfn, n) ((thisfn)[n].is_private)#define TYPE_FN_FIELD_PROTECTED(thisfn, n) ((thisfn)[n].is_protected)#define TYPE_FN_FIELD_STUB(thisfn, n) ((thisfn)[n].is_stub)#define TYPE_FN_FIELD_FCONTEXT(thisfn, n) ((thisfn)[n].fcontext)#define TYPE_FN_FIELD_VOFFSET(thisfn, n) ((thisfn)[n].voffset-2)#define TYPE_FN_FIELD_VIRTUAL_P(thisfn, n) ((thisfn)[n].voffset > 1)#define TYPE_FN_FIELD_STATIC_P(thisfn, n) ((thisfn)[n].voffset == VOFFSET_STATIC)extern struct type *builtin_type_void;extern struct type *builtin_type_char;extern struct type *builtin_type_short;extern struct type *builtin_type_int;extern struct type *builtin_type_long;extern struct type *builtin_type_signed_char;extern struct type *builtin_type_unsigned_char;extern struct type *builtin_type_unsigned_short;extern struct type *builtin_type_unsigned_int;extern struct type *builtin_type_unsigned_long;extern struct type *builtin_type_float;extern struct type *builtin_type_double;extern struct type *builtin_type_long_double;extern struct type *builtin_type_complex;extern struct type *builtin_type_double_complex;/* This type represents a type that was unrecognized in symbol read-in. */extern struct type *builtin_type_error;extern struct type *builtin_type_long_long;extern struct type *builtin_type_unsigned_long_long;/* Modula-2 types */extern struct type *builtin_type_m2_char;extern struct type *builtin_type_m2_int;extern struct type *builtin_type_m2_card;extern struct type *builtin_type_m2_real;extern struct type *builtin_type_m2_bool;/* LONG_LONG is defined if the host has "long long". */#ifdef LONG_LONG#define BUILTIN_TYPE_LONGEST builtin_type_long_long#define BUILTIN_TYPE_UNSIGNED_LONGEST builtin_type_unsigned_long_long#else /* not LONG_LONG. */#define BUILTIN_TYPE_LONGEST builtin_type_long#define BUILTIN_TYPE_UNSIGNED_LONGEST builtin_type_unsigned_long#endif /* not LONG_LONG. *//* Maximum and minimum values of built-in types */#define MAX_OF_TYPE(t) \ TYPE_UNSIGNED(t) ? UMAX_OF_SIZE(TYPE_LENGTH(t)) \ : MAX_OF_SIZE(TYPE_LENGTH(t))#define MIN_OF_TYPE(t) \ TYPE_UNSIGNED(t) ? UMIN_OF_SIZE(TYPE_LENGTH(t)) \ : MIN_OF_SIZE(TYPE_LENGTH(t))/* Allocate space for storing data associated with a particular type. We ensure that the space is allocated using the same mechanism that was used to allocate the space for the type structure itself. I.E. if the type is on an objfile's type_obstack, then the space for data associated with that type will also be allocated on the type_obstack. If the type is not associated with any particular objfile (such as builtin types), then the data space will be allocated with xmalloc, the same as for the type structure. */#define TYPE_ALLOC(t,size) \ (TYPE_OBJFILE (t) != NULL \ ? obstack_alloc (&TYPE_OBJFILE (t) -> type_obstack, size) \ : xmalloc (size))extern struct type *alloc_type PARAMS ((struct objfile *));extern struct type *init_type PARAMS ((enum type_code, int, int, char *, struct objfile *));extern struct type *lookup_reference_type PARAMS ((struct type *));extern struct type *make_reference_type PARAMS ((struct type *, struct type **));extern struct type *lookup_member_type PARAMS ((struct type *, struct type *));extern voidsmash_to_method_type PARAMS ((struct type *, struct type *, struct type *, struct type **));extern voidsmash_to_member_type PARAMS ((struct type *, struct type *, struct type *));extern struct type *allocate_stub_method PARAMS ((struct type *));extern char *type_name_no_tag PARAMS ((const struct type *));extern struct type *lookup_struct_elt_type PARAMS ((struct type *, char *, int));extern struct type *make_pointer_type PARAMS ((struct type *, struct type **));extern struct type *lookup_pointer_type PARAMS ((struct type *));extern struct type *make_function_type PARAMS ((struct type *, struct type **));extern struct type *lookup_function_type PARAMS ((struct type *));extern struct type *create_array_type PARAMS ((struct type *, int));extern struct type *lookup_unsigned_typename PARAMS ((char *));extern struct type *lookup_signed_typename PARAMS ((char *));extern voidcheck_stub_type PARAMS ((struct type *));extern voidcheck_stub_method PARAMS ((struct type *, int, int));extern struct type *lookup_primitive_typename PARAMS ((char *));extern char *gdb_mangle_name PARAMS ((struct type *, int, int));extern struct type *builtin_type PARAMS ((char **));extern struct type *error_type PARAMS ((char **));extern struct type *lookup_typename PARAMS ((char *, struct block *, int));extern struct type *lookup_template_type PARAMS ((char *, struct type *, struct block *));extern struct type *lookup_fundamental_type PARAMS ((struct objfile *, int));extern voidfill_in_vptr_fieldno PARAMS ((struct type *));#if MAINTENANCE_CMDSextern void recursive_dump_type PARAMS ((struct type *, int));#endif/* printcmd.c */extern voidprint_scalar_formatted PARAMS ((char *, struct type *, int, int, FILE *));#if MAINTENANCE_CMDSextern void maintenance_print_type PARAMS ((char *, int));#endif#endif /* GDBTYPES_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -