diff mbox

[21/55] Introduce ada_value_print_inner

Message ID 20191208182958.10181-22-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey Dec. 8, 2019, 6:29 p.m. UTC
This introduces ada_value_print_inner.

gdb/ChangeLog
2019-12-08  Tom Tromey  <tom@tromey.com>

	* ada-valprint.c (ada_value_print_inner): New function.
	* ada-lang.h (ada_value_print_inner): Declare.
	* ada-lang.c (ada_language_defn): Use ada_value_print_inner.

Change-Id: I88786b629ba0fe08f508b968f2a1a301dfe1c25f
---
 gdb/ChangeLog      |  6 ++++++
 gdb/ada-lang.c     |  2 +-
 gdb/ada-lang.h     |  5 +++++
 gdb/ada-valprint.c | 11 +++++++++++
 4 files changed, 23 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index eeccfae69ac..42ebf31954a 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -14114,7 +14114,7 @@  extern const struct language_defn ada_language_defn = {
   ada_print_type,               /* Print a type using appropriate syntax */
   ada_print_typedef,            /* Print a typedef using appropriate syntax */
   ada_val_print,                /* Print a value using appropriate syntax */
-  nullptr,			/* la_value_print_inner */
+  ada_value_print_inner,	/* la_value_print_inner */
   ada_value_print,              /* Print a top-level value */
   ada_read_var_value,		/* la_read_var_value */
   NULL,                         /* Language specific skip_trampoline */
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 13a917affec..f9994340a68 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -169,6 +169,11 @@  extern void ada_val_print (struct type *, int, CORE_ADDR,
 			   struct value *,
 			   const struct value_print_options *);
 
+/* Implement la_value_print_inner for Ada.  */
+
+extern void ada_value_print_inner (struct value *, struct ui_file *, int,
+				   const struct value_print_options *);
+
 extern void ada_value_print (struct value *, struct ui_file *,
 			     const struct value_print_options *);
 
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 4bb9247f519..609e5af7481 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -1219,6 +1219,17 @@  ada_val_print (struct type *type,
     }
 }
 
+/* See ada-lang.h.  */
+
+void
+ada_value_print_inner (struct value *val, struct ui_file *stream,
+		       int recurse,
+		       const struct value_print_options *options)
+{
+  ada_val_print (value_type (val), value_embedded_offset (val),
+		 value_address (val), stream, recurse, val, options);
+}
+
 void
 ada_value_print (struct value *val0, struct ui_file *stream,
 		 const struct value_print_options *options)