Use common_val_print in infcmd.c

This changes some spots in infcmd.c to use common_val_print (which,
despite its name, is a value-based API) rather than val_print.

gdb/ChangeLog
2020-03-13  Tom Tromey  <tom@tromey.com>

	* infcmd.c (default_print_one_register_info): Use
	common_val_print.
This commit is contained in:
Tom Tromey 2020-03-13 17:39:52 -06:00
parent c2a44efee1
commit 3444c526a3
2 changed files with 8 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2020-03-13 Tom Tromey <tom@tromey.com>
* infcmd.c (default_print_one_register_info): Use
common_val_print.
2020-03-13 Tom Tromey <tom@tromey.com>
* valprint.h (common_val_print_checked): Declare.

View File

@ -2260,9 +2260,7 @@ default_print_one_register_info (struct ui_file *file,
get_user_print_options (&opts);
opts.deref_ref = 1;
val_print (regtype,
value_embedded_offset (val), 0,
&format_stream, 0, val, &opts, current_language);
common_val_print (val, &format_stream, 0, &opts, current_language);
if (print_raw_format)
{
@ -2280,9 +2278,7 @@ default_print_one_register_info (struct ui_file *file,
/* Print the register in hex. */
get_formatted_print_options (&opts, 'x');
opts.deref_ref = 1;
val_print (regtype,
value_embedded_offset (val), 0,
&format_stream, 0, val, &opts, current_language);
common_val_print (val, &format_stream, 0, &opts, current_language);
/* If not a vector register, print it also according to its
natural format. */
if (print_raw_format && TYPE_VECTOR (regtype) == 0)
@ -2290,9 +2286,7 @@ default_print_one_register_info (struct ui_file *file,
pad_to_column (format_stream, value_column_2);
get_user_print_options (&opts);
opts.deref_ref = 1;
val_print (regtype,
value_embedded_offset (val), 0,
&format_stream, 0, val, &opts, current_language);
common_val_print (val, &format_stream, 0, &opts, current_language);
}
}