+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
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 *);
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)
{
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);
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,