From d00664dbba2802bacfed2335b6f249fc418182a0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 16:13:08 -0700 Subject: 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 --- gdb/mi/mi-cmd-stack.c | 7 +++---- gdb/mi/mi-main.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index abe0d34..1554f95 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -501,14 +501,13 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what, && (arg->val || arg->error))); if (skip_unavailable && arg->val != NULL - && (value_entirely_unavailable (arg->val) + && (arg->val->entirely_unavailable () /* A scalar object that does not have all bits available is also considered unavailable, because all bits contribute to its representation. */ || (val_print_scalar_type_p (arg->val->type ()) - && !value_bytes_available (arg->val, - arg->val->embedded_offset (), - arg->val->type ()->length ())))) + && !arg->val->bytes_available (arg->val->embedded_offset (), + arg->val->type ()->length ())))) return; gdb::optional tuple_emitter; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index f2e680c..84a95a2 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1096,7 +1096,7 @@ output_register (frame_info_ptr frame, int regnum, int format, struct value *val = value_of_register (regnum, frame); struct value_print_options opts; - if (skip_unavailable && !value_entirely_available (val)) + if (skip_unavailable && !val->entirely_available ()) return; ui_out_emit_tuple tuple_emitter (uiout, NULL); -- cgit v1.1