Convert ada_val_print_ref to value-based API
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:42 +0000 (18:03 -0600)
This converts ada_val_print_ref to the value-based API by using
common_val_print rather than val_print.

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

* ada-valprint.c (ada_val_print_ref): Use common_val_print.

gdb/ChangeLog
gdb/ada-valprint.c

index b235b0f6d647184cc24004461e46b4da80606715..78ffe614c95ea6ecef380fd95ef96ffb66a764a8 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-13  Tom Tromey  <tom@tromey.com>
+
+       * ada-valprint.c (ada_val_print_ref): Use common_val_print.
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * ada-valprint.c (ada_value_print_num): New function.
index 4b89473fef39cbb6407ad837e8afcc299da13d71..1d3b06ddfddb16fd6ef007c24cfabdeea4ba1336 100644 (file)
@@ -1207,10 +1207,8 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr,
   if (value_lazy (deref_val))
     value_fetch_lazy (deref_val);
 
-  val_print (value_type (deref_val),
-            value_embedded_offset (deref_val),
-            value_address (deref_val), stream, recurse + 1,
-            deref_val, options, language_def (language_ada));
+  common_val_print (deref_val, stream, recurse + 1,
+                   options, language_def (language_ada));
 }
 
 /* See the comment on ada_val_print.  This function differs in that it