mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Centralize printing "<optimized out>".
gdb/ * valprint.h (val_print_optimized_out): Declare. * cp-valprint.c (cp_print_value_fields): Use val_print_optimized_out. * jv-valprint.c (java_print_value_fields): Ditto. * p-valprint.c (pascal_object_print_value_fields): Ditto. * printcmd.c (print_formatted): Ditto. * valprint.c (valprint_check_validity): Ditto. (value_check_printable): Ditto. (val_print_optimized_out): New. gdb/doc/ * gdb.texinfo: s/value optimized out/optimized out/g gdb/testsuite/ * gdb.base/frame-args.exp: Adjust. * gdb.dwarf2/dw2-noloc.exp: Adjust. * gdb.dwarf2/dw2-inline-param.exp: Adjust. * gdb.dwarf2/pieces.exp: Adjust. * gdb.opt/clobbered-registers-O2.exp: Adjust. * gdb.opt/inline-locals.exp: Adjust. * gdb.threads/fork-child-threads.exp: Adjust.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user