Turn many optimized-out value functions into methods

This turns many functions that are related to optimized-out or
availability-checking to be methods of value.  The static function
value_entirely_covered_by_range_vector is also converted to be a
private method.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 16:13:08 -07:00
parent cda0334434
commit d00664dbba
37 changed files with 237 additions and 272 deletions

View File

@@ -257,9 +257,9 @@ c_value_print_array (struct value *val,
long as the entire array is valid. */
if (c_textual_element_type (unresolved_elttype,
options->format)
&& value_bytes_available (val, 0, type->length ())
&& !value_bits_any_optimized_out (val, 0,
TARGET_CHAR_BIT * type->length ()))
&& val->bytes_available (0, type->length ())
&& !val->bits_any_optimized_out (0,
TARGET_CHAR_BIT * type->length ()))
{
int force_ellipses = 0;
@@ -520,7 +520,7 @@ c_value_print (struct value *val, struct ui_file *stream,
/* Pointer to class, check real type of object. */
gdb_printf (stream, "(");
if (value_entirely_available (val))
if (val->entirely_available ())
{
real_type = value_rtti_indirect_type (val, &full, &top,
&using_enc);