GDB (xrefs)
|
#include "gdbtypes.h"
Public Attributes | ||
__extension__ enum type_code | code: 8 | |
unsigned int | m_flag_unsigned: 1 | |
unsigned int | m_flag_nosign: 1 | |
unsigned int | m_flag_stub: 1 | |
unsigned int | m_flag_target_stub: 1 | |
unsigned int | m_flag_prototyped: 1 | |
unsigned int | m_flag_varargs: 1 | |
unsigned int | m_flag_vector: 1 | |
unsigned int | m_flag_stub_supported: 1 | |
unsigned int | m_flag_gnu_ifunc: 1 | |
unsigned int | m_flag_fixed_instance: 1 | |
unsigned int | m_flag_objfile_owned: 1 | |
unsigned int | m_flag_endianity_not_default: 1 | |
unsigned int | m_flag_declared_class: 1 | |
unsigned int | m_flag_flag_enum: 1 | |
unsigned int | m_multi_dimensional: 1 | |
__extension__ enum type_specific_kind | type_specific_field: 3 | |
short | nfields | |
const char * | name | |
union type_owner | m_owner | |
struct type * | m_target_type | |
union { | ||
struct field * fields | ||
struct range_bounds * bounds | ||
struct type * complex_type | ||
} | flds_bnds | |
union type_specific | type_specific | |
struct dynamic_prop_list * | dyn_prop_list | |
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 789 of file gdbtypes.h.
struct range_bounds* main_type::bounds |
Union member used for range types.
Definition at line 897 of file gdbtypes.h.
Referenced by type::bounds(), and type::set_bounds().
__extension__ enum type_code main_type::code |
Code for kind of type.
Definition at line 793 of file gdbtypes.h.
Referenced by type::code(), and type::set_code().
struct type* main_type::complex_type |
Definition at line 901 of file gdbtypes.h.
struct dynamic_prop_list* main_type::dyn_prop_list |
Contains all dynamic type properties.
Definition at line 911 of file gdbtypes.h.
Referenced by type::add_dyn_prop(), copy_type(), copy_type_recursive(), type::dyn_prop(), quirk_ada_thick_pointer(), and type::remove_dyn_prop().
struct field* main_type::fields |
Definition at line 893 of file gdbtypes.h.
Referenced by type::fields(), and type::set_fields().
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.
Referenced by type::bounds(), type::fields(), type::set_bounds(), and type::set_fields().
unsigned int main_type::m_flag_declared_class |
True if this type was declared with "class" rather than "struct".
Definition at line 815 of file gdbtypes.h.
Referenced by type::is_declared_class(), and type::set_is_declared_class().
unsigned int main_type::m_flag_endianity_not_default |
Definition at line 810 of file gdbtypes.h.
Referenced by type::endianity_is_not_default(), and type::set_endianity_is_not_default().
unsigned int main_type::m_flag_fixed_instance |
Definition at line 808 of file gdbtypes.h.
Referenced by type::is_fixed_instance(), and type::set_is_fixed_instance().
unsigned int main_type::m_flag_flag_enum |
True if this is an enum type with disjoint values. This affects how the enum is printed.
Definition at line 820 of file gdbtypes.h.
Referenced by type::is_flag_enum(), and type::set_is_flag_enum().
unsigned int main_type::m_flag_gnu_ifunc |
Definition at line 807 of file gdbtypes.h.
Referenced by type::is_gnu_ifunc(), and type::set_is_gnu_ifunc().
unsigned int main_type::m_flag_nosign |
Definition at line 800 of file gdbtypes.h.
Referenced by type::has_no_signedness(), and type::set_has_no_signedness().
unsigned int main_type::m_flag_objfile_owned |
Definition at line 809 of file gdbtypes.h.
Referenced by type::is_objfile_owned(), type::set_owner(), and type::set_owner().
unsigned int main_type::m_flag_prototyped |
Definition at line 803 of file gdbtypes.h.
Referenced by type::is_prototyped(), and type::set_is_prototyped().
unsigned int main_type::m_flag_stub |
Definition at line 801 of file gdbtypes.h.
Referenced by type::is_stub(), and type::set_is_stub().
unsigned int main_type::m_flag_stub_supported |
Definition at line 806 of file gdbtypes.h.
Referenced by type::set_stub_is_supported(), and type::stub_is_supported().
unsigned int main_type::m_flag_target_stub |
Definition at line 802 of file gdbtypes.h.
Referenced by type::set_target_is_stub(), and type::target_is_stub().
unsigned int main_type::m_flag_unsigned |
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 799 of file gdbtypes.h.
Referenced by type::is_unsigned(), and type::set_is_unsigned().
unsigned int main_type::m_flag_varargs |
Definition at line 804 of file gdbtypes.h.
Referenced by type::has_varargs(), and type::set_has_varargs().
unsigned int main_type::m_flag_vector |
Definition at line 805 of file gdbtypes.h.
Referenced by type::is_vector(), and type::set_is_vector().
unsigned int main_type::m_multi_dimensional |
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 829 of file gdbtypes.h.
Referenced by type::is_multi_dimensional(), and type::set_is_multi_dimensional().
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 861 of file gdbtypes.h.
Referenced by type::arch_owner(), type::objfile_owner(), type::set_owner(), and type::set_owner().
struct type* main_type::m_target_type |
For a pointer type, describes the type of object pointed to.
Definition at line 873 of file gdbtypes.h.
Referenced by type::set_target_type(), and type::target_type().
const char* main_type::name |
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 847 of file gdbtypes.h.
Referenced by gdb.printing.FlagEnumerationPrinter::__call__(), gdb.disassembler.Disassembler::__init__(), gdb.printing.SubPrettyPrinter::__init__(), gdb.types.TypePrinter::__init__(), gdb.unwinder.Unwinder::__init__(), gdb.xmethod.XMethod::__init__(), gdb.xmethod.XMethodMatcher::__init__(), gdb.printing.PrettyPrinter::__init__(), type::name(), and type::set_name().
short main_type::nfields |
Number of fields described for this type. This field appears at this location because it packs nicely here.
Definition at line 839 of file gdbtypes.h.
Referenced by type::num_fields(), and type::set_num_fields().
union type_specific main_type::type_specific |
Slot to point to additional language-specific fields of this type.
Definition at line 908 of file gdbtypes.h.
Referenced by type::bit_offset(), type::bit_size(), type::bit_size_differs_p(), type::fixed_point_info(), and type::set_fixed_point_info().
__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 834 of file gdbtypes.h.
Referenced by type::bit_offset(), type::bit_size(), and type::bit_size_differs_p().