const struct language_defn *language)
{
struct type *type = value_type (value);
- struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
+ struct type *var_type = type->field (field_num).type ();
int which = ada_which_variant_applies (var_type, outer_value);
if (which < 0)
wrap_here (n_spaces (2 + 2 * recurse));
}
- annotate_field_begin (TYPE_FIELD_TYPE (type, i));
+ annotate_field_begin (type->field (i).type ());
fprintf_filtered (stream, "%.*s",
ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
TYPE_FIELD_NAME (type, i));
int bit_size = TYPE_FIELD_BITSIZE (type, i);
struct value_print_options opts;
- adjust_type_signedness (TYPE_FIELD_TYPE (type, i));
+ adjust_type_signedness (type->field (i).type ());
v = ada_value_primitive_packed_val
(value, nullptr,
bit_pos / HOST_CHAR_BIT,
bit_pos % HOST_CHAR_BIT,
- bit_size, TYPE_FIELD_TYPE (type, i));
+ bit_size, type->field (i).type ());
opts = *options;
opts.deref_ref = 0;
common_val_print (v, stream, recurse + 1, &opts, language);
struct type *type = ada_check_typedef (value_type (val));
if (ada_is_tag_type (type))
{
- const char *name = ada_tag_name (val);
+ gdb::unique_xmalloc_ptr<char> name = ada_tag_name (val);
if (name != NULL)
- fprintf_filtered (stream, " (%s)", name);
+ fprintf_filtered (stream, " (%s)", name.get ());
}
}