From efaf1ae025cbef5438d2fe943dd010b773d757ac Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 14:38:30 -0700 Subject: Turn remaining value_contents functions into methods This turns the remaining value_contents functions -- value_contents, value_contents_all, value_contents_for_printing, and value_contents_for_printing_const -- into methods of value. It also converts the static functions require_not_optimized_out and require_available to be private methods. Approved-By: Simon Marchi --- gdb/alpha-tdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gdb/alpha-tdep.c') diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 5edde7a..0d51ff7 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -253,7 +253,7 @@ alpha_register_to_value (frame_info_ptr frame, int regnum, /* Convert to VALTYPE. */ gdb_assert (valtype->length () == 4); - alpha_sts (gdbarch, out, value_contents_all (value).data ()); + alpha_sts (gdbarch, out, value->contents_all ().data ()); release_value (value); return 1; @@ -360,7 +360,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, sp = (sp & -16) - 16; /* Write the real data into the stack. */ - write_memory (sp, value_contents (arg).data (), 16); + write_memory (sp, arg->contents ().data (), 16); /* Construct the indirection. */ arg_type = lookup_pointer_type (arg_type); @@ -381,7 +381,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, sp = (sp & -16) - 16; /* Write the real data into the stack. */ - write_memory (sp, value_contents (arg).data (), 32); + write_memory (sp, arg->contents ().data (), 32); /* Construct the indirection. */ arg_type = lookup_pointer_type (arg_type); @@ -395,7 +395,7 @@ alpha_push_dummy_call (struct gdbarch *gdbarch, struct value *function, m_arg->len = arg_type->length (); m_arg->offset = accumulate_size; accumulate_size = (accumulate_size + m_arg->len + 7) & ~7; - m_arg->contents = value_contents (arg).data (); + m_arg->contents = arg->contents ().data (); } /* Determine required argument register loads, loading an argument register -- cgit v1.1