Use common_val_print in f-valprint.c
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:39 +0000 (18:03 -0600)
This changes a couple spots in f-valprint.c to use common_val_print
rather than val_print.

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

* f-valprint.c (f77_print_array_1, f_val_print): Use
common_val_print.

gdb/ChangeLog
gdb/f-valprint.c

index 21444545b4443b9cf5243ebf42a893afba8a55d3..6cda7481b8c90c770f2752747a83c59560cb180b 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-13  Tom Tromey  <tom@tromey.com>
+
+       * f-valprint.c (f77_print_array_1, f_val_print): Use
+       common_val_print.
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * riscv-tdep.c (riscv_print_one_register_info): Use
index 0393ddfa8ab3f051b63377d64bc4939e714f5de0..bbc09cd56065fcf7b306fae589a911cb1bd41008 100644 (file)
@@ -156,10 +156,7 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
        {
          struct value *elt = value_subscript ((struct value *)val, i);
 
-         val_print (value_type (elt),
-                    value_embedded_offset (elt),
-                    value_address (elt), stream, recurse,
-                    elt, options, current_language);
+         common_val_print (elt, stream, recurse, options, current_language);
 
          if (i != upperbound)
            fprintf_filtered (stream, ", ");
@@ -346,10 +343,8 @@ f_val_print (struct type *type, int embedded_offset,
                  fputs_filtered (" = ", stream);
                }
 
-             val_print (value_type (field),
-                        value_embedded_offset (field),
-                        value_address (field), stream, recurse + 1,
-                        field, options, current_language);
+             common_val_print (field, stream, recurse + 1,
+                               options, current_language);
 
              ++printed_field;
            }