aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 14:38:30 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:16 -0700
commitefaf1ae025cbef5438d2fe943dd010b773d757ac (patch)
treed51e1d379430439462d5cb1358c642e679647f12 /gdb/c-valprint.c
parentcdf3de175d41acec85d6c3cc8b599f79658edb06 (diff)
downloadgdb-efaf1ae025cbef5438d2fe943dd010b773d757ac.zip
gdb-efaf1ae025cbef5438d2fe943dd010b773d757ac.tar.gz
gdb-efaf1ae025cbef5438d2fe943dd010b773d757ac.tar.bz2
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>
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r--gdb/c-valprint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 63f3e50..55ba029 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -237,7 +237,7 @@ c_value_print_array (struct value *val,
{
struct type *type = check_typedef (val->type ());
CORE_ADDR address = val->address ();
- const gdb_byte *valaddr = value_contents_for_printing (val).data ();
+ const gdb_byte *valaddr = val->contents_for_printing ().data ();
struct type *unresolved_elttype = type->target_type ();
struct type *elttype = check_typedef (unresolved_elttype);
@@ -334,7 +334,7 @@ c_value_print_ptr (struct value *val, struct ui_file *stream, int recurse,
}
struct type *type = check_typedef (val->type ());
- const gdb_byte *valaddr = value_contents_for_printing (val).data ();
+ const gdb_byte *valaddr = val->contents_for_printing ().data ();
if (options->vtblprint && cp_is_vtbl_ptr_type (type))
{
@@ -375,7 +375,7 @@ c_value_print_struct (struct value *val, struct ui_file *stream, int recurse,
TYPE_CODE_PTR.) */
int offset = type->field (VTBL_FNADDR_OFFSET).loc_bitpos () / 8;
struct type *field_type = type->field (VTBL_FNADDR_OFFSET).type ();
- const gdb_byte *valaddr = value_contents_for_printing (val).data ();
+ const gdb_byte *valaddr = val->contents_for_printing ().data ();
CORE_ADDR addr = extract_typed_address (valaddr + offset, field_type);
print_function_pointer_address (options, type->arch (), addr, stream);
@@ -406,7 +406,7 @@ c_value_print_int (struct value *val, struct ui_file *stream,
intended to be used as an integer or a character, print
the character equivalent as well. */
struct type *type = val->type ();
- const gdb_byte *valaddr = value_contents_for_printing (val).data ();
+ const gdb_byte *valaddr = val->contents_for_printing ().data ();
if (c_textual_element_type (type, options->format))
{
gdb_puts (" ", stream);