diff options
author | Michael Chastain <mec@google.com> | 2003-08-20 23:00:06 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2003-08-20 23:00:06 +0000 |
commit | 0955bbf0c04ddb4caa7d64f93638bb5dddb4143d (patch) | |
tree | 5a63122d9c8badc52b59bbc09d29a78354346d5e | |
parent | 260a4188fe6d59b79a6f139b1e4dd77378d00bef (diff) | |
download | gdb-0955bbf0c04ddb4caa7d64f93638bb5dddb4143d.zip gdb-0955bbf0c04ddb4caa7d64f93638bb5dddb4143d.tar.gz gdb-0955bbf0c04ddb4caa7d64f93638bb5dddb4143d.tar.bz2 |
2003-08-20 Michael Chastain <mec@shout.net>
* gdbtypes.h (struct main_type): Rearrange to save space.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 46 |
2 files changed, 29 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2fa84ab..f33d232 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2003-08-20 Michael Chastain <mec@shout.net> + + * gdbtypes.h (struct main_type): Rearrange to save space. + 2003-08-20 Michael Snyder <msnyder@redhat.com> * trad-frame.c: Comment typo fix. diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index e7d755a..554778a 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -272,11 +272,26 @@ enum type_code #define TYPE_ADDRESS_CLASS_ALL(t) (TYPE_INSTANCE_FLAGS(t) \ & TYPE_FLAG_ADDRESS_CLASS_ALL) +/* This structure is space-critical. + Its layout has been tweaked to reduce the space used. */ + struct main_type { /* Code for kind of type */ - enum type_code code; + ENUM_BITFIELD(type_code) code : 8; + + /* These fields appear at this location because they pack nicely here. */ + /* FIXME, these should probably be restricted to a Fortran-specific + field in some fashion. */ +#define BOUND_CANNOT_BE_DETERMINED 5 +#define BOUND_BY_REF_ON_STACK 4 +#define BOUND_BY_VALUE_ON_STACK 3 +#define BOUND_BY_REF_IN_REG 2 +#define BOUND_BY_VALUE_IN_REG 1 +#define BOUND_SIMPLE 0 + int upper_bound_type : 4; + int lower_bound_type : 4; /* Name of this type, or NULL if none. @@ -298,17 +313,6 @@ struct main_type char *tag_name; - /* FIXME, these should probably be restricted to a Fortran-specific - field in some fashion. */ -#define BOUND_CANNOT_BE_DETERMINED 5 -#define BOUND_BY_REF_ON_STACK 4 -#define BOUND_BY_VALUE_ON_STACK 3 -#define BOUND_BY_REF_IN_REG 2 -#define BOUND_BY_VALUE_IN_REG 1 -#define BOUND_SIMPLE 0 - int upper_bound_type; - int lower_bound_type; - /* Every type is now associated with a particular objfile, and the type is allocated on the type_obstack for that objfile. One problem however, is that there are times when gdb allocates new types while @@ -340,6 +344,15 @@ struct main_type short nfields; + /* Field number of the virtual function table pointer in + VPTR_BASETYPE. If -1, we were unable to find the virtual + function table pointer in initial symbol reading, and + fill_in_vptr_fieldno should be called to find it if possible. + + Unused if this type does not have virtual functions. */ + + short vptr_fieldno; + /* For structure and union types, a description of each field. For set and pascal array types, there is one "field", whose type is the domain type of the set or array. @@ -421,15 +434,6 @@ struct main_type struct type *vptr_basetype; - /* Field number of the virtual function table pointer in - VPTR_BASETYPE. If -1, we were unable to find the virtual - function table pointer in initial symbol reading, and - fill_in_vptr_fieldno should be called to find it if possible. - - Unused if this type does not have virtual functions. */ - - int vptr_fieldno; - /* Slot to point to additional language-specific fields of this type. */ union type_specific |