diff options
Diffstat (limited to 'gdb/value.h')
-rw-r--r-- | gdb/value.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h index 5676d24..0bc5130 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1169,4 +1169,12 @@ extern struct type *result_type_of_xmethod (struct value *method, extern struct value *call_xmethod (struct value *method, int argc, struct value **argv); +/* Given a discriminated union type and some corresponding value + contents, this will return the field index of the currently active + variant. This will throw an exception if no active variant can be + found. */ + +extern int value_union_variant (struct type *union_type, + const gdb_byte *contents); + #endif /* !defined (VALUE_H) */ |