Introduce pascal_value_print_inner
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 pascal_value_print_inner.

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

* p-valprint.c (pascal_value_print_inner): New function.
* p-lang.h (pascal_value_print_inner): Declare.
* p-lang.c (pascal_language_defn): Use pascal_value_print_inner.

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

index f4720f5fa593fe7042128952088546a6631ee439..cd39b22eecc57b6d785b2753abfc424e51555150 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-13  Tom Tromey  <tom@tromey.com>
+
+       * p-valprint.c (pascal_value_print_inner): New function.
+       * p-lang.h (pascal_value_print_inner): Declare.
+       * p-lang.c (pascal_language_defn): Use pascal_value_print_inner.
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * m2-valprint.c (m2_value_print_inner): New function.
index bf74b800fb2c67f9cc5b670ed68dd017cde8deda..87ddf34180224e6abd3134e59dcdeb2dc4f5e6e5 100644 (file)
@@ -448,7 +448,7 @@ extern const struct language_defn pascal_language_defn =
   pascal_print_type,           /* Print a type using appropriate syntax */
   pascal_print_typedef,                /* Print a typedef using appropriate syntax */
   pascal_val_print,            /* Print a value using appropriate syntax */
-  nullptr,                     /* la_value_print_inner */
+  pascal_value_print_inner,    /* la_value_print_inner */
   pascal_value_print,          /* Print a top-level value */
   default_read_var_value,      /* la_read_var_value */
   NULL,                                /* Language specific skip_trampoline */
index 960d129c1142ea2da1843d49a7f2c1b4d71088f1..ae0b2aaede0dd1334aa46cf78e8ba50c38caabca 100644 (file)
@@ -42,6 +42,11 @@ extern void pascal_val_print (struct type *, int,
                              struct value *,
                              const struct value_print_options *);
 
+/* Implement la_value_print_inner for Pascal.  */
+
+extern void pascal_value_print_inner (struct value *, struct ui_file *, int,
+                                     const struct value_print_options *);
+
 extern void pascal_value_print (struct value *, struct ui_file *,
                                const struct value_print_options *);
 
index 68e8c6e11e7b7d151c58f6a945a33fdff341e7d0..1361fbe298a6d5113ac8bd0427def0b9c48c6c00 100644 (file)
@@ -425,6 +425,19 @@ pascal_val_print (struct type *type,
             TYPE_CODE (type));
     }
 }
+
+/* See p-lang.h.  */
+
+void
+pascal_value_print_inner (struct value *val, struct ui_file *stream,
+                         int recurse,
+                         const struct value_print_options *options)
+
+{
+  pascal_val_print (value_type (val), value_embedded_offset (val),
+                   value_address (val), stream, recurse, val, options);
+}
+
 \f
 void
 pascal_value_print (struct value *val, struct ui_file *stream,