GDB (API)
|
#include "gdbtypes.h"
Public Member Functions | |
bool | is_default () const |
bool | matches (ULONGEST value, bool is_unsigned) const |
Public Attributes | |
gdb::array_view< discriminant_range > | discriminants |
int | first_field |
int | last_field |
gdb::array_view< variant_part > | parts |
A single variant. A variant has a list of discriminant values. When the discriminator matches one of these, the variant is enabled. Each variant controls zero or more fields; and may also control other variant parts as well. This struct corresponds to DW_TAG_variant in DWARF.
Definition at line 223 of file gdbtypes.h.
|
inline |
Return true if this is the default variant. The default variant can be recognized because it has no associated discriminants.
Definition at line 241 of file gdbtypes.h.
Return true if this variant matches VALUE. IS_UNSIGNED is true if this should be an unsigned comparison; false for signed.
gdb::array_view<discriminant_range> variant::discriminants |
The discriminant ranges for this variant.
Definition at line 226 of file gdbtypes.h.
int variant::first_field |
The fields controlled by this variant. This is inclusive on the low end and exclusive on the high end. A variant may not control any fields, in which case the two values will be equal. These are indexes into the type's array of fields.
Definition at line 232 of file gdbtypes.h.
int variant::last_field |
Definition at line 233 of file gdbtypes.h.
gdb::array_view<variant_part> variant::parts |
Variant parts controlled by this variant.
Definition at line 236 of file gdbtypes.h.