X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fgdbtypes.h;h=69f8cdb3df4aaa4230f2145a4299a782ba7bfcf2;hb=321432c0c6c6849c0e924f65422fe4a92b1b6907;hp=8221bcec37a0f8e10cce352f1c6bb55192f1d68a;hpb=ad2f7632f9c475a71481499715635ea3344b92d8;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 8221bcec37..69f8cdb3df 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -101,13 +101,14 @@ enum type_code TYPE_CODE_RANGE, /* Range (integers within spec'd bounds) */ /* A string type which is like an array of character but prints - differently (at least for CHILL). It does not contain a length - field as Pascal strings (for many Pascals, anyway) do; if we want - to deal with such strings, we should use a new type code. */ + differently (at least for (OBSOLETE) CHILL (OBSOLETE)). It + does not contain a length field as Pascal strings (for many + Pascals, anyway) do; if we want to deal with such strings, we + should use a new type code. */ TYPE_CODE_STRING, - /* String of bits; like TYPE_CODE_SET but prints differently (at least - for CHILL). */ + /* String of bits; like TYPE_CODE_SET but prints differently (at + least for (OBSOLETE) CHILL (OBSOLETE)). */ TYPE_CODE_BITSTRING, /* Unknown type. The length field is valid if we were able to @@ -252,6 +253,22 @@ enum type_code #define TYPE_FLAG_VECTOR (1 << 12) #define TYPE_VECTOR(t) (TYPE_FLAGS (t) & TYPE_FLAG_VECTOR) +/* Address class flags. Some environments provide for pointers whose + size is different from that of a normal pointer or address types + where the bits are interpreted differently than normal addresses. The + TYPE_FLAG_ADDRESS_CLASS_n flags may be used in target specific + ways to represent these different types of address classes. */ +#define TYPE_FLAG_ADDRESS_CLASS_1 (1 << 13) +#define TYPE_ADDRESS_CLASS_1(t) (TYPE_INSTANCE_FLAGS(t) \ + & TYPE_FLAG_ADDRESS_CLASS_1) +#define TYPE_FLAG_ADDRESS_CLASS_2 (1 << 14) +#define TYPE_ADDRESS_CLASS_2(t) (TYPE_INSTANCE_FLAGS(t) \ + & TYPE_FLAG_ADDRESS_CLASS_2) +#define TYPE_FLAG_ADDRESS_CLASS_ALL (TYPE_FLAG_ADDRESS_CLASS_1 \ + | TYPE_FLAG_ADDRESS_CLASS_2) +#define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \ + & TYPE_FLAG_ADDRESS_CLASS_ALL) + struct main_type { /* Code for kind of type */ @@ -380,22 +397,25 @@ struct main_type CORE_ADDR physaddr; char *physname; - - /* For a function or member type, this is 1 if the argument is marked - artificial. Artificial arguments should not be shown to the - user. */ - int artificial; } loc; + /* For a function or member type, this is 1 if the argument is marked + artificial. Artificial arguments should not be shown to the + user. */ + unsigned int artificial : 1; + + /* This flag is zero for non-static fields, 1 for fields whose location + is specified by the label loc.physname, and 2 for fields whose location + is specified by loc.physaddr. */ + + unsigned int static_kind : 2; + /* Size of this field, in bits, or zero if not packed. For an unpacked field, the field's type's length - says how many bytes the field occupies. - A value of -1 or -2 indicates a static field; -1 means the location - is specified by the label loc.physname; -2 means that loc.physaddr - specifies the actual address. */ + says how many bytes the field occupies. */ - int bitsize; + unsigned int bitsize : 29; /* In a struct or union type, type of this field. In a function or member type, type of this argument. @@ -792,14 +812,15 @@ extern void allocate_cplus_struct_type (struct type *); #define FIELD_TYPE(thisfld) ((thisfld).type) #define FIELD_NAME(thisfld) ((thisfld).name) #define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos) -#define FIELD_ARTIFICIAL(thisfld) ((thisfld).loc.artificial) +#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial) #define FIELD_BITSIZE(thisfld) ((thisfld).bitsize) +#define FIELD_STATIC_KIND(thisfld) ((thisfld).static_kind) #define FIELD_PHYSNAME(thisfld) ((thisfld).loc.physname) #define FIELD_PHYSADDR(thisfld) ((thisfld).loc.physaddr) #define SET_FIELD_PHYSNAME(thisfld, name) \ - ((thisfld).bitsize = -1, FIELD_PHYSNAME(thisfld) = (name)) + ((thisfld).static_kind = 1, FIELD_PHYSNAME(thisfld) = (name)) #define SET_FIELD_PHYSADDR(thisfld, name) \ - ((thisfld).bitsize = -2, FIELD_PHYSADDR(thisfld) = (name)) + ((thisfld).static_kind = 2, FIELD_PHYSADDR(thisfld) = (name)) #define TYPE_FIELD(thistype, n) TYPE_MAIN_TYPE(thistype)->fields[n] #define TYPE_FIELD_TYPE(thistype, n) FIELD_TYPE(TYPE_FIELD(thistype, n)) #define TYPE_FIELD_NAME(thistype, n) FIELD_NAME(TYPE_FIELD(thistype, n)) @@ -839,8 +860,9 @@ extern void allocate_cplus_struct_type (struct type *); (TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits == NULL ? 0 \ : B_TST(TYPE_CPLUS_SPECIFIC(thistype)->virtual_field_bits, (n))) -#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].bitsize < 0) -#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].bitsize == -2) +#define TYPE_FIELD_STATIC(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind != 0) +#define TYPE_FIELD_STATIC_KIND(thistype, n) TYPE_MAIN_TYPE (thistype)->fields[n].static_kind +#define TYPE_FIELD_STATIC_HAS_ADDR(thistype, n) (TYPE_MAIN_TYPE (thistype)->fields[n].static_kind == 2) #define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_PHYSNAME(TYPE_FIELD(thistype, n)) #define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_PHYSADDR(TYPE_FIELD(thistype, n)) @@ -951,6 +973,10 @@ extern struct type *builtin_type_v8hi; extern struct type *builtin_type_v4hi; extern struct type *builtin_type_v2si; +/* Type for 64 bit vectors. */ +extern struct type *builtin_type_vec64; +extern struct type *builtin_type_vec64i; + /* Type for 128 bit vectors. */ extern struct type *builtin_type_vec128; extern struct type *builtin_type_vec128i; @@ -994,13 +1020,13 @@ extern struct type *builtin_type_m2_card; extern struct type *builtin_type_m2_real; extern struct type *builtin_type_m2_bool; -/* Chill types */ +/* OBSOLETE Chill types */ -extern struct type *builtin_type_chill_bool; -extern struct type *builtin_type_chill_char; -extern struct type *builtin_type_chill_long; -extern struct type *builtin_type_chill_ulong; -extern struct type *builtin_type_chill_real; +/* OBSOLETE extern struct type *builtin_type_chill_bool; */ +/* OBSOLETE extern struct type *builtin_type_chill_char; */ +/* OBSOLETE extern struct type *builtin_type_chill_long; */ +/* OBSOLETE extern struct type *builtin_type_chill_ulong; */ +/* OBSOLETE extern struct type *builtin_type_chill_real; */ /* Fortran (F77) types */ @@ -1070,7 +1096,7 @@ extern void replace_type (struct type *, struct type *); extern int address_space_name_to_int (char *); -extern char *address_space_int_to_name (int); +extern const char *address_space_int_to_name (int); extern struct type *make_type_with_address_space (struct type *type, int space_identifier); @@ -1109,7 +1135,7 @@ extern struct type *create_string_type (struct type *, struct type *); extern struct type *create_set_type (struct type *, struct type *); -extern int chill_varying_type (struct type *); +/* OBSOLETE extern int chill_varying_type (struct type *); */ extern struct type *lookup_unsigned_typename (char *); @@ -1119,7 +1145,7 @@ extern struct type *check_typedef (struct type *); #define CHECK_TYPEDEF(TYPE) (TYPE) = check_typedef (TYPE) -extern void check_stub_method (struct type *, int, int); +extern void check_stub_method_group (struct type *, int); extern struct type *lookup_primitive_typename (char *);