diff options
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index c98e3153402..6ddbed83ebf 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -272,7 +272,7 @@ valprint_check_validity (struct ui_file *stream, if (! value_bits_valid (val, TARGET_CHAR_BIT * offset, TARGET_CHAR_BIT * TYPE_LENGTH (type))) { - fprintf_filtered (stream, _("<value optimized out>")); + val_print_optimized_out (stream); return 0; } @@ -287,6 +287,12 @@ valprint_check_validity (struct ui_file *stream, return 1; } +void +val_print_optimized_out (struct ui_file *stream) +{ + fprintf_filtered (stream, _("<optimized out>")); +} + /* Print using the given LANGUAGE the data of type TYPE located at VALADDR (within GDB), which came from the inferior at address ADDRESS, onto stdio stream STREAM according to OPTIONS. @@ -378,7 +384,7 @@ value_check_printable (struct value *val, struct ui_file *stream) if (value_entirely_optimized_out (val)) { - fprintf_filtered (stream, _("<value optimized out>")); + val_print_optimized_out (stream); return 0; } |