From 3444c526a33e61aeff86cbe1184e765458007890 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Mar 2020 17:39:52 -0600 Subject: 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 * infcmd.c (default_print_one_register_info): Use common_val_print. --- gdb/infcmd.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index b4b128b..d78374c 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -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); } } -- cgit v1.1