mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
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:
parent
c2a44efee1
commit
3444c526a3
@ -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>
|
2020-03-13 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* valprint.h (common_val_print_checked): Declare.
|
* valprint.h (common_val_print_checked): Declare.
|
||||||
|
12
gdb/infcmd.c
12
gdb/infcmd.c
@ -2260,9 +2260,7 @@ default_print_one_register_info (struct ui_file *file,
|
|||||||
get_user_print_options (&opts);
|
get_user_print_options (&opts);
|
||||||
opts.deref_ref = 1;
|
opts.deref_ref = 1;
|
||||||
|
|
||||||
val_print (regtype,
|
common_val_print (val, &format_stream, 0, &opts, current_language);
|
||||||
value_embedded_offset (val), 0,
|
|
||||||
&format_stream, 0, val, &opts, current_language);
|
|
||||||
|
|
||||||
if (print_raw_format)
|
if (print_raw_format)
|
||||||
{
|
{
|
||||||
@ -2280,9 +2278,7 @@ default_print_one_register_info (struct ui_file *file,
|
|||||||
/* Print the register in hex. */
|
/* Print the register in hex. */
|
||||||
get_formatted_print_options (&opts, 'x');
|
get_formatted_print_options (&opts, 'x');
|
||||||
opts.deref_ref = 1;
|
opts.deref_ref = 1;
|
||||||
val_print (regtype,
|
common_val_print (val, &format_stream, 0, &opts, current_language);
|
||||||
value_embedded_offset (val), 0,
|
|
||||||
&format_stream, 0, val, &opts, current_language);
|
|
||||||
/* If not a vector register, print it also according to its
|
/* If not a vector register, print it also according to its
|
||||||
natural format. */
|
natural format. */
|
||||||
if (print_raw_format && TYPE_VECTOR (regtype) == 0)
|
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);
|
pad_to_column (format_stream, value_column_2);
|
||||||
get_user_print_options (&opts);
|
get_user_print_options (&opts);
|
||||||
opts.deref_ref = 1;
|
opts.deref_ref = 1;
|
||||||
val_print (regtype,
|
common_val_print (val, &format_stream, 0, &opts, current_language);
|
||||||
value_embedded_offset (val), 0,
|
|
||||||
&format_stream, 0, val, &opts, current_language);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user