diff options
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/ada-lang.c | 5 | ||||
-rw-r--r-- | gdb/ada-lang.h | 5 | ||||
-rw-r--r-- | gdb/ada-valprint.c | 3 |
4 files changed, 15 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a0921f4..c88961f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2020-05-11 Tom Tromey <tromey@adacore.com> + + * ada-lang.c (ada_value_primitive_field): Now public. + * ada-lang.h (ada_value_primitive_field): Declare. + * ada-valprint.c (print_field_values): Use + ada_value_primitive_field for wrapper fields. + 2020-05-11 Tom de Vries <tdevries@suse.de> * dwarf2/index-write.c (debug_names::psymbol_tag): Handle diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index be26231..db6f606 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -204,9 +204,6 @@ static struct symbol *standard_lookup (const char *, const struct block *, static struct value *ada_search_struct_field (const char *, struct value *, int, struct type *); -static struct value *ada_value_primitive_field (struct value *, int, int, - struct type *); - static int find_struct_field (const char *, struct type *, int, struct type **, int *, int *, int *, int *); @@ -7125,7 +7122,7 @@ ada_in_variant (LONGEST val, struct type *type, int field_num) fields. FIELDNO says which field. Differs from value_primitive_field only in that it can handle packed values of arbitrary type. */ -static struct value * +struct value * ada_value_primitive_field (struct value *arg1, int offset, int fieldno, struct type *arg_type) { diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index bb9e3c3..c0a7109 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -234,6 +234,11 @@ extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *); extern int ada_scan_number (const char *, int, LONGEST *, int *); +extern struct value *ada_value_primitive_field (struct value *arg1, + int offset, + int fieldno, + struct type *arg_type); + extern struct type *ada_parent_type (struct type *); extern int ada_is_ignored_field (struct type *, int); diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 31f3a50..010446d 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -609,7 +609,8 @@ print_field_values (struct value *value, struct value *outer_value, if (ada_is_wrapper_field (type, i)) { - struct value *field_val = value_field (value, i); + struct value *field_val = ada_value_primitive_field (value, 0, + i, type); comma_needed = print_field_values (field_val, field_val, stream, recurse, options, |