]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Two simple uses of value_print_scalar_formatted
authorTom Tromey <tom@tromey.com>
Fri, 13 Mar 2020 23:39:52 +0000 (17:39 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 14 Mar 2020 00:03:40 +0000 (18:03 -0600)
A couple of spots could be easily converted to use
value_print_scalar_formatted.  This patch makes this change.

gdb/ChangeLog
2020-03-13  Tom Tromey  <tom@tromey.com>

* printcmd.c (print_formatted): Use value_print_scalar_formatted.
* mips-tdep.c (mips_print_register): Use
value_print_scalar_formatted.

gdb/ChangeLog
gdb/mips-tdep.c
gdb/printcmd.c

index 264565edf19c73e407dae33cbe94465b228242da..2c97ac85a4603987de1abc4cdf3c7ade09daf6e5 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-13  Tom Tromey  <tom@tromey.com>
+
+       * printcmd.c (print_formatted): Use value_print_scalar_formatted.
+       * mips-tdep.c (mips_print_register): Use
+       value_print_scalar_formatted.
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * valprint.h (value_print_scalar_formatted): Declare.
index 2599f825e83d9c0b0dcccdfc8e03ffbc223852cd..c6952a5ba3f1ccc2db77d983d17e54575bbeb69a 100644 (file)
@@ -6373,10 +6373,7 @@ mips_print_register (struct ui_file *file, struct frame_info *frame,
     fprintf_filtered (file, ": ");
 
   get_formatted_print_options (&opts, 'x');
-  val_print_scalar_formatted (value_type (val),
-                             value_embedded_offset (val),
-                             val,
-                             &opts, 0, file);
+  value_print_scalar_formatted (val, &opts, 0, file);
 }
 
 /* Print IEEE exception condition bits in FLAGS.  */
index 78d8d3d81e1863e7698c2ecfc68a80a1760d13de..645ac4da9a4785025738adc5d1ea6d2d9d3f2b8b 100644 (file)
@@ -321,10 +321,7 @@ print_formatted (struct value *val, int size,
   else
     /* User specified format, so don't look to the type to tell us
        what to do.  */
-    val_print_scalar_formatted (type,
-                               value_embedded_offset (val),
-                               val,
-                               options, size, stream);
+    value_print_scalar_formatted (val, options, size, stream);
 }
 
 /* Return builtin floating point type of same length as TYPE.