Patchwork [06/55] Use common_val_print in riscv-tdep.c

login
register
mail settings
Submitter Tom Tromey
Date Dec. 8, 2019, 6:29 p.m.
Message ID <20191208182958.10181-7-tom@tromey.com>
Download mbox | patch
Permalink /patch/36590/
State New
Headers show

Comments

Tom Tromey - Dec. 8, 2019, 6:29 p.m.
This changes some spots in riscv-tdep.c to use common_val_print rather
than val_print.

gdb/ChangeLog
2019-12-08  Tom Tromey  <tom@tromey.com>

	* riscv-tdep.c (riscv_print_one_register_info): Use
	common_val_print.

Change-Id: Ibb4b545b288d74f0b7e7dc92f0861b92cc63d81f
---
 gdb/ChangeLog    |  5 +++++
 gdb/riscv-tdep.c | 12 +++---------
 2 files changed, 8 insertions(+), 9 deletions(-)

Patch

diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index d262b7d07e7..3582bfa8d36 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -693,9 +693,7 @@  riscv_print_one_register_info (struct gdbarch *gdbarch,
       get_user_print_options (&opts);
       opts.deref_ref = 1;
 
-      val_print (regtype,
-		 value_embedded_offset (val), 0,
-		 file, 0, val, &opts, current_language);
+      common_val_print (val, file, 0, &opts, current_language);
 
       if (print_raw_format)
 	{
@@ -712,9 +710,7 @@  riscv_print_one_register_info (struct gdbarch *gdbarch,
       /* Print the register in hex.  */
       get_formatted_print_options (&opts, 'x');
       opts.deref_ref = 1;
-      val_print (regtype,
-		 value_embedded_offset (val), 0,
-		 file, 0, val, &opts, current_language);
+      common_val_print (val, file, 0, &opts, current_language);
 
       if (print_raw_format)
 	{
@@ -848,9 +844,7 @@  riscv_print_one_register_info (struct gdbarch *gdbarch,
 		  get_user_print_options (&opts);
 		  opts.deref_ref = 1;
 		  fprintf_filtered (file, "\t");
-		  val_print (regtype,
-			     value_embedded_offset (val), 0,
-			     file, 0, val, &opts, current_language);
+		  common_val_print (val, file, 0, &opts, current_language);
 		}
 	    }
 	}