From: Tom Tromey Date: Fri, 13 Mar 2020 23:39:52 +0000 (-0600) Subject: Use common_val_print in infcmd.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3444c526a33e61aeff86cbe1184e765458007890;p=binutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c761221dd9f..f68e90317d9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-03-13 Tom Tromey + + * infcmd.c (default_print_one_register_info): Use + common_val_print. + 2020-03-13 Tom Tromey * valprint.h (common_val_print_checked): Declare. diff --git a/gdb/infcmd.c b/gdb/infcmd.c index b4b128b2873..d78374c6deb 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); } }