mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-26 12:43:34 +08:00
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 <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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user