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 <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 14:38:30 -07:00
parent cdf3de175d
commit efaf1ae025
84 changed files with 330 additions and 329 deletions

View File

@@ -179,7 +179,7 @@ amd64_windows_adjust_args_passed_by_pointer (struct value **args,
if (amd64_windows_passed_by_pointer (args[i]->type ()))
{
struct type *type = args[i]->type ();
const gdb_byte *valbuf = value_contents (args[i]).data ();
const gdb_byte *valbuf = args[i]->contents ().data ();
const int len = type->length ();
/* Store a copy of that argument on the stack, aligned to
@@ -205,7 +205,7 @@ amd64_windows_store_arg_in_reg (struct regcache *regcache,
struct value *arg, int regno)
{
struct type *type = arg->type ();
const gdb_byte *valbuf = value_contents (arg).data ();
const gdb_byte *valbuf = arg->contents ().data ();
gdb_byte buf[8];
gdb_assert (type->length () <= 8);
@@ -295,7 +295,7 @@ amd64_windows_push_arguments (struct regcache *regcache, int nargs,
for (i = 0; i < num_stack_args; i++)
{
struct type *type = stack_args[i]->type ();
const gdb_byte *valbuf = value_contents (stack_args[i]).data ();
const gdb_byte *valbuf = stack_args[i]->contents ().data ();
write_memory (sp + element * 8, valbuf, type->length ());
element += ((type->length () + 7) / 8);