diff options
author | Tom Tromey <tom@tromey.com> | 2020-03-13 17:39:52 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-03-13 18:03:39 -0600 |
commit | 3444c526a33e61aeff86cbe1184e765458007890 (patch) | |
tree | 2bc646e5de10e35c2ad9b60cd7041fc1096d2f66 /gdb | |
parent | c2a44efee1cbe5321a850c53f34e9c205a1d6ca0 (diff) | |
download | gdb-3444c526a33e61aeff86cbe1184e765458007890.zip gdb-3444c526a33e61aeff86cbe1184e765458007890.tar.gz gdb-3444c526a33e61aeff86cbe1184e765458007890.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/infcmd.c | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c761221..f68e903 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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. * valprint.c (common_val_print_checked): New function. * stack.c (print_frame_arg): Use common_val_print_checked. 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); } } |