/* Print values for GDB, the GNU debugger.
- Copyright (C) 1986-2016 Free Software Foundation, Inc.
+ Copyright (C) 1986-2017 Free Software Foundation, Inc.
This file is part of GDB.
val_print_scalar_type_p (struct type *type)
{
type = check_typedef (type);
- while (TYPE_CODE (type) == TYPE_CODE_REF)
+ while (TYPE_IS_REFERENCE (type))
{
type = TYPE_TARGET_TYPE (type);
type = check_typedef (type);
}
}
-/* generic_val_print helper for TYPE_CODE_REF. */
+/* generic_val_print helper for TYPE_CODE_{RVALUE_,}REF. */
static void
generic_val_print_ref (struct type *type,
break;
case TYPE_CODE_REF:
+ case TYPE_CODE_RVALUE_REF:
generic_val_print_ref (type, embedded_offset, stream, recurse,
original_value, options);
break;
if (!options->raw)
{
- const gdb_byte *valaddr = value_contents_for_printing (val);
-
- ret = apply_ext_lang_val_pretty_printer (type, valaddr, embedded_offset,
+ ret = apply_ext_lang_val_pretty_printer (type, embedded_offset,
address, stream, recurse,
val, options, language);
if (ret)
get a fixed representation of our value. */
val = ada_to_fixed_value (val);
+ if (value_lazy (val))
+ value_fetch_lazy (val);
+
val_print (value_type (val),
value_embedded_offset (val), value_address (val),
stream, recurse,
{
int r
= apply_ext_lang_val_pretty_printer (value_type (val),
- value_contents_for_printing (val),
value_embedded_offset (val),
value_address (val),
stream, 0,