[PATCH 04/55] Use common_val_print in infcmd.c
Tom Tromey
tom@tromey.com
Sun Dec 8 18:30:00 GMT 2019
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
2019-12-08 Tom Tromey <tom@tromey.com>
* infcmd.c (default_print_one_register_info): Use
common_val_print.
Change-Id: I13efb6db9f1bf4cb90aa3eac1702a633074e192b
---
gdb/ChangeLog | 5 +++++
gdb/infcmd.c | 12 +++---------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 2a253469e74..c8b444bfd65 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2221,9 +2221,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)
{
@@ -2241,9 +2239,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)
@@ -2251,9 +2247,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);
}
}
--
2.17.2
More information about the Gdb-patches
mailing list