GDB (API)
|
#include "gdbtypes.h"
Main structure representing a type in GDB.
This structure is space-critical. Its layout has been tweaked to reduce the space used.
Definition at line 814 of file gdbtypes.h.
struct range_bounds* main_type::bounds |
Union member used for range types.
Definition at line 926 of file gdbtypes.h.
__extension__ enum type_code main_type::code |
Code for kind of type.
Definition at line 818 of file gdbtypes.h.
Definition at line 930 of file gdbtypes.h.
struct dynamic_prop_list* main_type::dyn_prop_list |
Contains all dynamic type properties.
Definition at line 940 of file gdbtypes.h.
Definition at line 922 of file gdbtypes.h.
union { ... } main_type::flds_bnds |
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. For range types, there are two "fields", the minimum and maximum values (both inclusive). For enum types, each possible value is described by one "field". For a function or method type, a "field" for each parameter. For C++ classes, there is one field for each base class (if it is a derived class) plus one field for each class data member. Member functions are recorded elsewhere.
Using a pointer to a separate array of fields allows all types to have the same size, which is useful because we can allocate the space for a type before we know what to put in it.
True if this type was declared with "class" rather than "struct".
Definition at line 840 of file gdbtypes.h.
Definition at line 835 of file gdbtypes.h.
Definition at line 833 of file gdbtypes.h.
True if this is an enum type with disjoint values. This affects how the enum is printed.
Definition at line 845 of file gdbtypes.h.
Definition at line 832 of file gdbtypes.h.
Definition at line 825 of file gdbtypes.h.
Definition at line 834 of file gdbtypes.h.
Definition at line 828 of file gdbtypes.h.
Definition at line 826 of file gdbtypes.h.
Definition at line 831 of file gdbtypes.h.
Definition at line 827 of file gdbtypes.h.
Flags about this type. These fields appear at this location because they packs nicely here. See the TYPE_* macros for documentation about these fields.
Definition at line 824 of file gdbtypes.h.
Definition at line 829 of file gdbtypes.h.
Definition at line 830 of file gdbtypes.h.
__extension__ enum language main_type::m_lang |
Definition at line 863 of file gdbtypes.h.
For TYPE_CODE_ARRAY, this is true if this type is part of a multi-dimensional array. Multi-dimensional arrays are represented internally as arrays of arrays, and this flag lets gdb distinguish between multiple dimensions and an ordinary array of arrays. The flag is set on each inner dimension, but not the outermost dimension.
Definition at line 854 of file gdbtypes.h.
Number of fields described for this type. This field appears at this location because it packs nicely here.
Definition at line 868 of file gdbtypes.h.
union type_owner main_type::m_owner |
Every type is now associated with a particular objfile, and the type is allocated on the objfile_obstack for that objfile. One problem however, is that there are times when gdb allocates new types while it is not in the process of reading symbols from a particular objfile. Fortunately, these happen when the type being created is a derived type of an existing type, such as in lookup_pointer_type(). So we can just allocate the new type using the same objfile as the existing type, but to do this we need a backpointer to the objfile from the existing type. Yes this is somewhat ugly, but without major overhaul of the internal type system, it can't be avoided for now.
Definition at line 890 of file gdbtypes.h.
For a pointer type, describes the type of object pointed to.
Definition at line 902 of file gdbtypes.h.
Name of this type, or NULL if none.
This is used for printing only. For looking up a name, look for a symbol in the VAR_DOMAIN. This is generally allocated in the objfile's obstack. However coffread.c uses malloc.
Definition at line 876 of file gdbtypes.h.
union type_specific main_type::type_specific |
Slot to point to additional language-specific fields of this type.
Definition at line 937 of file gdbtypes.h.
__extension__ enum type_specific_kind main_type::type_specific_field |
A discriminant telling us which field of the type_specific union is being used for this type, if any.
Definition at line 859 of file gdbtypes.h.