GDB (xrefs)
|
#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.
References discriminants.
Referenced by compute_variant_fields_inner(), and print_choices().
bool variant::matches | ( | ULONGEST | value, |
bool | is_unsigned ) const |
Return true if this variant matches VALUE. IS_UNSIGNED is true if this should be an unsigned comparison; false for signed.
Definition at line 2475 of file gdbtypes.c.
References discriminants.
Referenced by compute_variant_fields_inner().
gdb::array_view<discriminant_range> variant::discriminants |
The discriminant ranges for this variant.
Definition at line 226 of file gdbtypes.h.
Referenced by create_one_variant(), is_default(), matches(), and print_choices().
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.
Referenced by compute_variant_fields_recurse(), create_one_variant(), handle_variant(), and print_variant_part().
int variant::last_field |
Definition at line 233 of file gdbtypes.h.
Referenced by compute_variant_fields_recurse(), create_one_variant(), handle_variant(), and print_variant_part().
gdb::array_view<variant_part> variant::parts |
Variant parts controlled by this variant.
Definition at line 236 of file gdbtypes.h.
Referenced by compute_variant_fields_recurse(), create_one_variant(), and print_variant_part().