Introduce f_value_print_innner
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)
This introduces f_value_print_innner.

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

* f-valprint.c (f_value_print_innner): New function.
* f-lang.h (f_value_print_innner): Declare.
* f-lang.c (f_language_defn): Use f_value_print_innner.

gdb/ChangeLog
gdb/f-lang.c
gdb/f-lang.h
gdb/f-valprint.c

index cd39b22eecc57b6d785b2753abfc424e51555150..5e59716335a8d6c334fdfe2d74d4907f0a903165 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-13  Tom Tromey  <tom@tromey.com>
+
+       * f-valprint.c (f_value_print_innner): New function.
+       * f-lang.h (f_value_print_innner): Declare.
+       * f-lang.c (f_language_defn): Use f_value_print_innner.
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * p-valprint.c (pascal_value_print_inner): New function.
index 4f4e8aedc4155531f200f2689bd5a2094d549960..e0a21849e6531f6e3adafc649a9f78703675c8c9 100644 (file)
@@ -647,7 +647,7 @@ extern const struct language_defn f_language_defn =
   f_print_type,                        /* Print a type using appropriate syntax */
   f_print_typedef,             /* Print a typedef using appropriate syntax */
   f_val_print,                 /* Print a value using appropriate syntax */
-  nullptr,                     /* la_value_print_inner */
+  f_value_print_innner,                /* la_value_print_inner */
   c_value_print,               /* FIXME */
   default_read_var_value,      /* la_read_var_value */
   NULL,                                /* Language specific skip_trampoline */
index 9dfbfe5976b7346f3deadd832bb2559cd78591c7..5cc59adde7e583fec0c20db5dc85abd92cc5e338 100644 (file)
@@ -41,6 +41,12 @@ extern void f_val_print (struct type *, int, CORE_ADDR,
                         struct value *,
                         const struct value_print_options *);
 
+/* Implement la_value_print_inner for Fortran.  */
+
+extern void f_value_print_innner (struct value *val, struct ui_file *stream,
+                                 int recurse,
+                                 const struct value_print_options *options);
+
 /* Language-specific data structures */
 
 /* A common block.  */
index bbc09cd56065fcf7b306fae589a911cb1bd41008..10593eebc0ce0a7c39ad366189c0721d6c7f7f6f 100644 (file)
@@ -394,6 +394,16 @@ f_val_print (struct type *type, int embedded_offset,
     }
 }
 
+/* See f-lang.h.  */
+
+void
+f_value_print_innner (struct value *val, struct ui_file *stream, int recurse,
+                     const struct value_print_options *options)
+{
+  f_val_print (value_type (val), value_embedded_offset (val),
+              value_address (val), stream, recurse, val, options);
+}
+
 static void
 info_common_command_for_block (const struct block *block, const char *comname,
                               int *any_printed)