From 5eb68a39a2c2908fc01f03e79daed72ba85dc14c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 11 May 2020 14:57:49 -0600 Subject: Fix Ada value printing on PPC64 The val_print removal patches introduced an Ada regression on PPC64 (probably any big-endian system). The issue comes because value_field does not understand that Ada wrapper fields can be bitfields that wrap a non-scalar type. In this case the value is already left-justified, so the justification done there does the wrong thing. Perhaps it would be good, eventually, to change value_field to understand this case. In the meantime this implements an Ada-specific solution. gdb/ChangeLog 2020-05-11 Tom Tromey * 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. --- gdb/ada-lang.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/ada-lang.h') 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); -- cgit v1.1