Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 7/9] Don't use 'struct' keyword with value_print_options
Date: Sat, 04 Jul 2026 16:05:21 -0600	[thread overview]
Message-ID: <20260704-print-opts-cleanup-v1-7-fb54a5112a8d@tromey.com> (raw)
In-Reply-To: <20260704-print-opts-cleanup-v1-0-fb54a5112a8d@tromey.com>

This changes the uses of value_print_options to drop the 'struct'
keyword.  There's no need for this any more.
---
 gdb/ada-lang.c               |  6 ++--
 gdb/ada-lang.h               |  4 +--
 gdb/ada-valprint.c           | 40 +++++++++++++--------------
 gdb/c-lang.c                 |  2 +-
 gdb/c-lang.h                 |  6 ++--
 gdb/c-valprint.c             | 18 ++++++------
 gdb/char-print.c             |  4 +--
 gdb/char-print.h             |  4 +--
 gdb/cp-valprint.c            | 14 +++++-----
 gdb/d-lang.c                 |  2 +-
 gdb/d-lang.h                 |  2 +-
 gdb/d-valprint.c             |  4 +--
 gdb/extension-priv.h         |  2 +-
 gdb/extension.c              |  2 +-
 gdb/extension.h              |  2 +-
 gdb/f-lang.h                 |  4 +--
 gdb/f-valprint.c             | 10 +++----
 gdb/gdbtypes.h               |  2 +-
 gdb/go-lang.h                |  2 +-
 gdb/go-valprint.c            |  4 +--
 gdb/guile/guile-internal.h   |  4 +--
 gdb/guile/scm-lazy-string.c  |  2 +-
 gdb/guile/scm-pretty-print.c | 14 +++++-----
 gdb/language.c               | 10 +++----
 gdb/language.h               |  6 ++--
 gdb/m2-lang.c                |  2 +-
 gdb/m2-lang.h                |  4 +--
 gdb/m2-valprint.c            | 14 +++++-----
 gdb/p-lang.c                 |  2 +-
 gdb/p-lang.h                 |  6 ++--
 gdb/p-valprint.c             | 24 ++++++++--------
 gdb/printcmd.c               | 10 +++----
 gdb/python/py-framefilter.c  |  4 +--
 gdb/python/py-prettyprint.c  | 16 +++++------
 gdb/python/python-internal.h |  4 +--
 gdb/rust-lang.c              | 18 ++++++------
 gdb/rust-lang.h              | 12 ++++----
 gdb/valprint.c               | 66 ++++++++++++++++++++++----------------------
 gdb/valprint.h               | 22 +++++++--------
 gdb/value.h                  |  8 +++---
 40 files changed, 191 insertions(+), 191 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 74a35332bee..2bb6cf7f9ff 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -13810,7 +13810,7 @@ class ada_language : public language_defn
   /* See language.h.  */
 
   void value_print (struct value *val, struct ui_file *stream,
-		    const struct value_print_options *options) const override
+		    const value_print_options *options) const override
   {
     return ada_value_print (val, stream, options);
   }
@@ -13819,7 +13819,7 @@ class ada_language : public language_defn
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override
+	 const value_print_options *options) const override
   {
     return ada_value_print_inner (val, stream, recurse, options);
   }
@@ -13890,7 +13890,7 @@ class ada_language : public language_defn
   void printstr (struct ui_file *stream, struct type *elttype,
 		 const gdb_byte *string, unsigned int length,
 		 const char *encoding, int force_ellipses,
-		 const struct value_print_options *options) const override
+		 const value_print_options *options) const override
   {
     /* ada_printstr doesn't handle UTF-8 too well, but we want this
        for lazy-string printing.  Defer this case to the generic
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index cd2fce73d61..882963baea4 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -165,10 +165,10 @@ extern void ada_print_typedef (struct type *type, struct symbol *new_symbol,
 /* Implement la_value_print_inner for Ada.  */
 
 extern void ada_value_print_inner (struct value *, struct ui_file *, int,
-				   const struct value_print_options *);
+				   const value_print_options *);
 
 extern void ada_value_print (struct value *, struct ui_file *,
-			     const struct value_print_options *);
+			     const value_print_options *);
 
 				/* Defined in ada-lang.c */
 
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 65330d5e983..8eeccf1d589 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -32,7 +32,7 @@
 
 static bool print_field_values (struct value *, struct value *,
 				struct ui_file *, int,
-				const struct value_print_options *,
+				const value_print_options *,
 				bool, const struct language_defn *);
 
 \f
@@ -43,7 +43,7 @@ static bool print_field_values (struct value *, struct value *,
 
 static void
 print_optional_low_bound (struct ui_file *stream, struct type *type,
-			  const struct value_print_options *options)
+			  const value_print_options *options)
 {
   struct type *index_type;
   LONGEST low_bound;
@@ -109,7 +109,7 @@ static void
 val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
 				 int offset, struct ui_file *stream,
 				 int recurse,
-				 const struct value_print_options *options)
+				 const value_print_options *options)
 {
   unsigned int i;
   unsigned int things_printed = 0;
@@ -204,7 +204,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
 
       if (i - i0 > options->repeat_count_threshold)
 	{
-	  struct value_print_options opts = *options;
+	  value_print_options opts = *options;
 
 	  opts.deref_ref = false;
 	  common_val_print (v0, stream, recurse + 1, &opts, current_language);
@@ -217,7 +217,7 @@ val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr,
       else
 	{
 	  int j;
-	  struct value_print_options opts = *options;
+	  value_print_options opts = *options;
 
 	  opts.deref_ref = false;
 	  for (j = i0; j < i; j += 1)
@@ -398,7 +398,7 @@ static bool
 print_variant_part (struct value *value, int field_num,
 		    struct value *outer_value,
 		    struct ui_file *stream, int recurse,
-		    const struct value_print_options *options,
+		    const value_print_options *options,
 		    bool comma_needed,
 		    const struct language_defn *language)
 {
@@ -432,7 +432,7 @@ print_variant_part (struct value *value, int field_num,
 static bool
 print_field_values (struct value *value, struct value *outer_value,
 		    struct ui_file *stream, int recurse,
-		    const struct value_print_options *options,
+		    const value_print_options *options,
 		    bool comma_needed,
 		    const struct language_defn *language)
 {
@@ -500,7 +500,7 @@ print_field_values (struct value *value, struct value *outer_value,
 	      struct value *v;
 	      int bit_pos = type->field (i).loc_bitpos ();
 	      int bit_size = type->field (i).bitsize ();
-	      struct value_print_options opts;
+	      value_print_options opts;
 
 	      v = ada_value_primitive_packed_val
 		    (value, nullptr,
@@ -514,7 +514,7 @@ print_field_values (struct value *value, struct value *outer_value,
 	}
       else
 	{
-	  struct value_print_options opts = *options;
+	  value_print_options opts = *options;
 
 	  opts.deref_ref = false;
 
@@ -534,7 +534,7 @@ static void
 ada_val_print_string (struct type *type, const gdb_byte *valaddr,
 		      int offset_aligned,
 		      struct ui_file *stream, int recurse,
-		      const struct value_print_options *options)
+		      const value_print_options *options)
 {
   enum bfd_endian byte_order = type_byte_order (type);
   struct type *elttype = type->target_type ();
@@ -578,7 +578,7 @@ ada_val_print_string (struct type *type, const gdb_byte *valaddr,
 static void
 ada_value_print_ptr (struct value *val,
 		     struct ui_file *stream, int recurse,
-		     const struct value_print_options *options)
+		     const value_print_options *options)
 {
   if (!options->format
       && val->type ()->target_type ()->code () == TYPE_CODE_INT
@@ -605,7 +605,7 @@ ada_value_print_ptr (struct value *val,
 
 static void
 ada_value_print_num (struct value *val, struct ui_file *stream, int recurse,
-		     const struct value_print_options *options)
+		     const value_print_options *options)
 {
   struct type *type = ada_check_typedef (val->type ());
   const gdb_byte *valaddr = val->contents_for_printing ().data ();
@@ -632,7 +632,7 @@ ada_value_print_num (struct value *val, struct ui_file *stream, int recurse,
 
       if (format)
 	{
-	  struct value_print_options opts = *options;
+	  value_print_options opts = *options;
 
 	  opts.format = format;
 	  value_print_scalar_formatted (val, &opts, 0, stream);
@@ -676,7 +676,7 @@ ada_value_print_num (struct value *val, struct ui_file *stream, int recurse,
 
 static void
 ada_val_print_enum (struct value *value, struct ui_file *stream, int recurse,
-		    const struct value_print_options *options)
+		    const value_print_options *options)
 {
   LONGEST val;
 
@@ -714,7 +714,7 @@ static void
 ada_val_print_struct_union (struct value *value,
 			    struct ui_file *stream,
 			    int recurse,
-			    const struct value_print_options *options)
+			    const value_print_options *options)
 {
   gdb_printf (stream, "(");
 
@@ -734,7 +734,7 @@ ada_val_print_struct_union (struct value *value,
 
 static void
 ada_value_print_array (struct value *val, struct ui_file *stream, int recurse,
-		       const struct value_print_options *options)
+		       const value_print_options *options)
 {
   struct type *type = ada_check_typedef (val->type ());
 
@@ -775,7 +775,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr,
 		   int offset, int offset_aligned, CORE_ADDR address,
 		   struct ui_file *stream, int recurse,
 		   struct value *original_value,
-		   const struct value_print_options *options)
+		   const value_print_options *options)
 {
   /* For references, the debugger is expected to print the value as
      an address if DEREF_REF is null.  But printing an address in place
@@ -830,7 +830,7 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr,
 
 void
 ada_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
-		       const struct value_print_options *options)
+		       const value_print_options *options)
 {
   struct type *type = ada_check_typedef (val->type ());
 
@@ -920,11 +920,11 @@ ada_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
 
 void
 ada_value_print (struct value *val0, struct ui_file *stream,
-		 const struct value_print_options *options)
+		 const value_print_options *options)
 {
   struct value *val = ada_to_fixed_value (val0);
   struct type *type = ada_check_typedef (val->type ());
-  struct value_print_options opts;
+  value_print_options opts;
 
   /* If it is a pointer, indicate what it points to; but not for
      "void *" pointers.  */
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index fdb5be7b2b7..fe7edd53366 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -174,7 +174,7 @@ void
 language_defn::printstr (struct ui_file *stream, struct type *type,
 			 const gdb_byte *string, unsigned int length,
 			 const char *user_encoding, int force_ellipses,
-			 const struct value_print_options *options) const
+			 const value_print_options *options) const
 {
   c_string_type str_type;
   const char *type_encoding;
diff --git a/gdb/c-lang.h b/gdb/c-lang.h
index 7d9eaf8571b..14a74b30af8 100644
--- a/gdb/c-lang.h
+++ b/gdb/c-lang.h
@@ -84,10 +84,10 @@ extern void c_print_typedef (struct type *,
 /* Implement la_value_print_inner for the C family of languages.  */
 
 extern void c_value_print_inner (struct value *, struct ui_file *, int,
-				 const struct value_print_options *);
+				 const value_print_options *);
 
 extern void c_value_print (struct value *, struct ui_file *,
-			   const struct value_print_options *);
+			   const value_print_options *);
 
 /* These are in c-lang.c: */
 
@@ -107,7 +107,7 @@ extern void cp_print_class_memberptr (struct value *, struct ui_file *);
 
 extern void cp_print_value_fields (struct value *,
 				   struct ui_file *, int,
-				   const struct value_print_options *,
+				   const value_print_options *,
 				   struct type **, int);
 
 /* gcc-2.6 or later (when using -fvtable-thunks)
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 9f9f61ea2e0..48087d2d7f7 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -142,7 +142,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
 			struct type *unresolved_elttype,
 			const gdb_byte *valaddr, int embedded_offset,
 			CORE_ADDR address, struct ui_file *stream, int recurse,
-			const struct value_print_options *options)
+			const value_print_options *options)
 {
   int want_space = 0;
   struct gdbarch *gdbarch = type->arch ();
@@ -234,7 +234,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
 static void
 c_value_print_array (struct value *val,
 		     struct ui_file *stream, int recurse,
-		     const struct value_print_options *options)
+		     const value_print_options *options)
 {
   struct type *type = check_typedef (val->type ());
   CORE_ADDR address = val->address ();
@@ -326,7 +326,7 @@ c_value_print_array (struct value *val,
 
 static void
 c_value_print_ptr (struct value *val, struct ui_file *stream, int recurse,
-		   const struct value_print_options *options)
+		   const value_print_options *options)
 {
   if (options->format && options->format != 's')
     {
@@ -362,7 +362,7 @@ c_value_print_ptr (struct value *val, struct ui_file *stream, int recurse,
 
 static void
 c_value_print_struct (struct value *val, struct ui_file *stream, int recurse,
-		      const struct value_print_options *options)
+		      const value_print_options *options)
 {
   struct type *type = check_typedef (val->type ());
 
@@ -389,11 +389,11 @@ c_value_print_struct (struct value *val, struct ui_file *stream, int recurse,
 
 static void
 c_value_print_int (struct value *val, struct ui_file *stream,
-		   const struct value_print_options *options)
+		   const value_print_options *options)
 {
   if (options->format || options->output_format)
     {
-      struct value_print_options opts = *options;
+      value_print_options opts = *options;
 
       opts.format = (options->format ? options->format
 		     : options->output_format);
@@ -421,7 +421,7 @@ c_value_print_int (struct value *val, struct ui_file *stream,
 
 void
 c_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
-		     const struct value_print_options *options)
+		     const value_print_options *options)
 {
   struct type *type = val->type ();
 
@@ -471,12 +471,12 @@ c_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
 \f
 void
 c_value_print (struct value *val, struct ui_file *stream,
-	       const struct value_print_options *options)
+	       const value_print_options *options)
 {
   struct type *type, *real_type;
   int full, using_enc;
   LONGEST top;
-  struct value_print_options opts = *options;
+  value_print_options opts = *options;
 
   opts.deref_ref = true;
 
diff --git a/gdb/char-print.c b/gdb/char-print.c
index 7c1ba85bbc1..8eba856c5bb 100644
--- a/gdb/char-print.c
+++ b/gdb/char-print.c
@@ -323,7 +323,7 @@ wchar_printer::count_next_character (wchar_iterator *iter,
 void
 wchar_printer::print_converted_chars_to_obstack
      (const std::vector<converted_character> &chars,
-      const struct value_print_options *options,
+      const value_print_options *options,
       int *finished)
 {
   unsigned int idx, num_elements;
@@ -479,7 +479,7 @@ void
 wchar_printer::print (struct ui_file *stream, const gdb_byte *string,
 		      unsigned int length, int force_ellipses,
 		      int c_style_terminator,
-		      const struct value_print_options *options)
+		      const value_print_options *options)
 {
   unsigned int i;
   int finished = 0;
diff --git a/gdb/char-print.h b/gdb/char-print.h
index bbadb968c80..44181a07de9 100644
--- a/gdb/char-print.h
+++ b/gdb/char-print.h
@@ -106,7 +106,7 @@ class wchar_printer
   void print (struct ui_file *stream, const gdb_byte *string,
 	      unsigned int length, int force_ellipses,
 	      int c_style_terminator,
-	      const struct value_print_options *options);
+	      const value_print_options *options);
 
 protected:
 
@@ -165,7 +165,7 @@ class wchar_printer
      elements in CHARS.  */
   void print_converted_chars_to_obstack
        (const std::vector<converted_character> &chars,
-	const struct value_print_options *options,
+	const value_print_options *options,
 	int *finished);
 
 private:
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 0558cad87c0..83719b9dd6c 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -48,10 +48,10 @@ static struct obstack dont_print_stat_array_obstack;
 
 static void cp_print_static_field (struct type *, struct value *,
 				   struct ui_file *, int,
-				   const struct value_print_options *);
+				   const value_print_options *);
 
 static void cp_print_value (struct value *, struct ui_file *,
-			    int, const struct value_print_options *,
+			    int, const value_print_options *,
 			    struct type **);
 
 
@@ -122,7 +122,7 @@ cp_is_vtbl_member (struct type *type)
 
 void
 cp_print_value_fields (struct value *val, struct ui_file *stream,
-		       int recurse, const struct value_print_options *options,
+		       int recurse, const value_print_options *options,
 		       struct type **dont_print_vb,
 		       int dont_print_statmem)
 {
@@ -389,7 +389,7 @@ static void
 cp_print_value_fields_pp (struct value *val,
 			  struct ui_file *stream,
 			  int recurse,
-			  const struct value_print_options *options,
+			  const value_print_options *options,
 			  struct type **dont_print_vb,
 			  int dont_print_statmem)
 {
@@ -413,7 +413,7 @@ cp_print_value_fields_pp (struct value *val,
 
 static void
 cp_print_value (struct value *val, struct ui_file *stream,
-		int recurse, const struct value_print_options *options,
+		int recurse, const value_print_options *options,
 		struct type **dont_print_vb)
 {
   struct type *type = check_typedef (val->type ());
@@ -562,9 +562,9 @@ cp_print_static_field (struct type *type,
 		       struct value *val,
 		       struct ui_file *stream,
 		       int recurse,
-		       const struct value_print_options *options)
+		       const value_print_options *options)
 {
-  struct value_print_options opts;
+  value_print_options opts;
 
   if (val->entirely_optimized_out ())
     {
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 0a779a7b7c0..f6ebf49fc19 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -160,7 +160,7 @@ class d_language : public language_defn
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override
+	 const value_print_options *options) const override
   {
     return d_value_print_inner (val, stream, recurse, options);
   }
diff --git a/gdb/d-lang.h b/gdb/d-lang.h
index 25de21da465..57a4d5bfbac 100644
--- a/gdb/d-lang.h
+++ b/gdb/d-lang.h
@@ -82,6 +82,6 @@ extern struct block_symbol d_lookup_nested_symbol (struct type *, const char *,
 
 extern void d_value_print_inner (struct value *val,
 				 struct ui_file *stream, int recurse,
-				 const struct value_print_options *options);
+				 const value_print_options *options);
 
 #endif /* GDB_D_LANG_H */
diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c
index 6e5757192da..493c043a7e2 100644
--- a/gdb/d-valprint.c
+++ b/gdb/d-valprint.c
@@ -31,7 +31,7 @@ dynamic_array_type (struct type *type,
 		    LONGEST embedded_offset, CORE_ADDR address,
 		    struct ui_file *stream, int recurse,
 		    struct value *val,
-		    const struct value_print_options *options)
+		    const value_print_options *options)
 {
   if (type->num_fields () == 2
       && type->field (0).type ()->code () == TYPE_CODE_INT
@@ -71,7 +71,7 @@ dynamic_array_type (struct type *type,
 
 void
 d_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
-		     const struct value_print_options *options)
+		     const value_print_options *options)
 {
   int ret;
 
diff --git a/gdb/extension-priv.h b/gdb/extension-priv.h
index 4ef87415413..24f9e79a9e5 100644
--- a/gdb/extension-priv.h
+++ b/gdb/extension-priv.h
@@ -165,7 +165,7 @@ struct extension_language_ops
   enum ext_lang_rc (*apply_val_pretty_printer)
     (const struct extension_language_defn *,
      struct value *val, struct ui_file *stream, int recurse,
-     const struct value_print_options *options,
+     const value_print_options *options,
      const struct language_defn *language);
 
   /* GDB access to the "frame filter" feature.
diff --git a/gdb/extension.c b/gdb/extension.c
index d8ef8123ab5..d82efa88a50 100644
--- a/gdb/extension.c
+++ b/gdb/extension.c
@@ -468,7 +468,7 @@ ext_lang_type_printers::~ext_lang_type_printers ()
 int
 apply_ext_lang_val_pretty_printer (struct value *val,
 				   struct ui_file *stream, int recurse,
-				   const struct value_print_options *options,
+				   const value_print_options *options,
 				   const struct language_defn *language)
 {
   for (const struct extension_language_defn *extlang : extension_languages)
diff --git a/gdb/extension.h b/gdb/extension.h
index b7bbf2a502d..ab5c7b2d167 100644
--- a/gdb/extension.h
+++ b/gdb/extension.h
@@ -296,7 +296,7 @@ extern gdb::unique_xmalloc_ptr<char> apply_ext_lang_type_printers
 
 extern int apply_ext_lang_val_pretty_printer
   (struct value *value, struct ui_file *stream, int recurse,
-   const struct value_print_options *options,
+   const value_print_options *options,
    const struct language_defn *language);
 
 extern enum ext_lang_bt_status apply_ext_lang_frame_filter
diff --git a/gdb/f-lang.h b/gdb/f-lang.h
index 7f43957c887..cb48eb3fde0 100644
--- a/gdb/f-lang.h
+++ b/gdb/f-lang.h
@@ -137,7 +137,7 @@ class f_language : public language_defn
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override;
+	 const value_print_options *options) const override;
 
   /* See language.h.  */
 
@@ -170,7 +170,7 @@ class f_language : public language_defn
   void printstr (struct ui_file *stream, struct type *elttype,
 		 const gdb_byte *string, unsigned int length,
 		 const char *encoding, int force_ellipses,
-		 const struct value_print_options *options) const override
+		 const value_print_options *options) const override
   {
     if (elttype->length () == 4)
       gdb_puts ("4_", stream);
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index f91c585fc0b..bff2acf6056 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -121,7 +121,7 @@ class fortran_array_printer_impl : public fortran_array_walker_base_impl
 				       struct value *val,
 				       struct ui_file *stream,
 				       int recurse,
-				       const struct value_print_options *options)
+				       const value_print_options *options)
     : m_elts (0),
       m_val (val),
       m_stream (stream),
@@ -401,7 +401,7 @@ class fortran_array_printer_impl : public fortran_array_walker_base_impl
 
   /* The print control options.  Gives us the maximum number of elements to
      print, and is passed through to each element that we print.  */
-  const struct value_print_options *m_options = nullptr;
+  const value_print_options *m_options = nullptr;
 
   /* The number of the current dimension being handled.  */
   LONGEST m_dimension;
@@ -424,7 +424,7 @@ static void
 fortran_print_array (struct type *type, CORE_ADDR address,
 		     struct ui_file *stream, int recurse,
 		     const struct value *val,
-		     const struct value_print_options *options)
+		     const value_print_options *options)
 {
   fortran_array_walker<fortran_array_printer_impl> p
     (type, address, (struct value *) val, stream, recurse, options);
@@ -451,7 +451,7 @@ static const struct generic_val_print_decorations f_decorations =
 void
 f_language::value_print_inner (struct value *val, struct ui_file *stream,
 			       int recurse,
-			       const struct value_print_options *options) const
+			       const value_print_options *options) const
 {
   struct type *type = check_typedef (val->type ());
   struct gdbarch *gdbarch = type->arch ();
@@ -583,7 +583,7 @@ f_language::value_print_inner (struct value *val, struct ui_file *stream,
     case TYPE_CODE_BOOL:
       if (options->format || options->output_format)
 	{
-	  struct value_print_options opts = *options;
+	  value_print_options opts = *options;
 	  opts.format = (options->format ? options->format
 			 : options->output_format);
 	  value_print_scalar_formatted (val, &opts, 0, stream);
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 572bf6d3d6f..7186362e026 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -2793,7 +2793,7 @@ extern void recursive_dump_type (struct type *, int);
 /* printcmd.c */
 
 extern void print_scalar_formatted (const gdb_byte *, struct type *,
-				    const struct value_print_options *,
+				    const value_print_options *,
 				    int, struct ui_file *);
 
 extern int can_dereference (struct type *);
diff --git a/gdb/go-lang.h b/gdb/go-lang.h
index 333cf74d161..c2be398df52 100644
--- a/gdb/go-lang.h
+++ b/gdb/go-lang.h
@@ -123,7 +123,7 @@ class go_language : public language_defn
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override;
+	 const value_print_options *options) const override;
 
   /* See language.h.  */
 
diff --git a/gdb/go-valprint.c b/gdb/go-valprint.c
index 877232e1ad5..0ee6571bc75 100644
--- a/gdb/go-valprint.c
+++ b/gdb/go-valprint.c
@@ -40,7 +40,7 @@ print_go_string (struct type *type,
 		 LONGEST embedded_offset, CORE_ADDR address,
 		 struct ui_file *stream, int recurse,
 		 struct value *val,
-		 const struct value_print_options *options)
+		 const value_print_options *options)
 {
   struct gdbarch *gdbarch = type->arch ();
   struct type *elt_ptr_type = type->field (0).type ();
@@ -88,7 +88,7 @@ print_go_string (struct type *type,
 void
 go_language::value_print_inner (struct value *val, struct ui_file *stream,
 				int recurse,
-				const struct value_print_options *options) const
+				const value_print_options *options) const
 {
   struct type *type = check_typedef (val->type ());
 
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h
index a86ad48eb12..7d406890e62 100644
--- a/gdb/guile/guile-internal.h
+++ b/gdb/guile/guile-internal.h
@@ -500,7 +500,7 @@ extern struct value *lsscm_safe_lazy_string_to_value (SCM string,
 
 extern void lsscm_val_print_lazy_string
   (SCM string, struct ui_file *stream,
-   const struct value_print_options *options);
+   const value_print_options *options);
 
 /* scm-objfile.c */
 
@@ -612,7 +612,7 @@ extern enum ext_lang_rc gdbscm_apply_val_pretty_printer
   (const struct extension_language_defn *,
    struct value *val,
    struct ui_file *stream, int recurse,
-   const struct value_print_options *options,
+   const value_print_options *options,
    const struct language_defn *language);
 
 extern int gdbscm_breakpoint_has_cond (const struct extension_language_defn *,
diff --git a/gdb/guile/scm-lazy-string.c b/gdb/guile/scm-lazy-string.c
index a13567eaa32..53324172617 100644
--- a/gdb/guile/scm-lazy-string.c
+++ b/gdb/guile/scm-lazy-string.c
@@ -349,7 +349,7 @@ lsscm_safe_lazy_string_to_value (SCM string, int arg_pos,
 
 void
 lsscm_val_print_lazy_string (SCM string, struct ui_file *stream,
-			     const struct value_print_options *options)
+			     const value_print_options *options)
 {
   lazy_string_smob *ls_smob;
   struct type *elt_type;
diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c
index 59825e32998..3bf994a7bdf 100644
--- a/gdb/guile/scm-pretty-print.c
+++ b/gdb/guile/scm-pretty-print.c
@@ -645,7 +645,7 @@ ppscm_print_exception_unless_memory_error (SCM exception,
 static enum guile_string_repr_result
 ppscm_print_string_repr (SCM printer, enum display_hint hint,
 			 struct ui_file *stream, int recurse,
-			 const struct value_print_options *options,
+			 const value_print_options *options,
 			 struct gdbarch *gdbarch,
 			 const struct language_defn *language)
 {
@@ -661,7 +661,7 @@ ppscm_print_string_repr (SCM printer, enum display_hint hint,
     }
   else if (scm_is_eq (str_scm, SCM_BOOL_T))
     {
-      struct value_print_options opts = *options;
+      value_print_options opts = *options;
 
       gdb_assert (replacement != NULL);
       opts.addressprint = false;
@@ -700,7 +700,7 @@ ppscm_print_string_repr (SCM printer, enum display_hint hint,
     }
   else if (lsscm_is_lazy_string (str_scm))
     {
-      struct value_print_options local_opts = *options;
+      value_print_options local_opts = *options;
 
       local_opts.addressprint = false;
       lsscm_val_print_lazy_string (str_scm, stream, &local_opts);
@@ -725,7 +725,7 @@ ppscm_print_string_repr (SCM printer, enum display_hint hint,
 static void
 ppscm_print_children (SCM printer, enum display_hint hint,
 		      struct ui_file *stream, int recurse,
-		      const struct value_print_options *options,
+		      const value_print_options *options,
 		      struct gdbarch *gdbarch,
 		      const struct language_defn *language,
 		      int printed_nothing)
@@ -885,7 +885,7 @@ ppscm_print_children (SCM printer, enum display_hint hint,
 
       if (lsscm_is_lazy_string (v_scm))
 	{
-	  struct value_print_options local_opts = *options;
+	  value_print_options local_opts = *options;
 
 	  local_opts.addressprint = false;
 	  lsscm_val_print_lazy_string (v_scm, stream, &local_opts);
@@ -914,7 +914,7 @@ ppscm_print_children (SCM printer, enum display_hint hint,
 	      /* When printing the key of a map we allow one additional
 		 level of depth.  This means the key will print before the
 		 value does.  */
-	      struct value_print_options opt = *options;
+	      value_print_options opt = *options;
 	      if (is_map && i % 2 == 0
 		  && opt.max_depth != -1
 		  && opt.max_depth < INT_MAX)
@@ -957,7 +957,7 @@ enum ext_lang_rc
 gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang,
 				 struct value *value,
 				 struct ui_file *stream, int recurse,
-				 const struct value_print_options *options,
+				 const value_print_options *options,
 				 const struct language_defn *language)
 {
   struct type *type = value->type ();
diff --git a/gdb/language.c b/gdb/language.c
index 3e3be66a676..25d57af363b 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -635,7 +635,7 @@ language_defn::watch_location_expression (struct type *type,
 
 void
 language_defn::value_print (struct value *val, struct ui_file *stream,
-	       const struct value_print_options *options) const
+	       const value_print_options *options) const
 {
   return c_value_print (val, stream, options);
 }
@@ -653,7 +653,7 @@ language_defn::parser (struct parser_state *ps) const
 void
 language_defn::value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const
+	 const value_print_options *options) const
 {
   return c_value_print_inner (val, stream, recurse, options);
 }
@@ -774,7 +774,7 @@ class unknown_language : public language_defn
   /* See language.h.  */
 
   void value_print (struct value *val, struct ui_file *stream,
-		    const struct value_print_options *options) const override
+		    const value_print_options *options) const override
   {
     error (_("value printing not implemented for language \"%s\""),
 	   natural_name ());
@@ -784,7 +784,7 @@ class unknown_language : public language_defn
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override
+	 const value_print_options *options) const override
   {
     error (_("inner value printing not implemented for language \"%s\""),
 	   natural_name ());
@@ -812,7 +812,7 @@ class unknown_language : public language_defn
   void printstr (struct ui_file *stream, struct type *elttype,
 		 const gdb_byte *string, unsigned int length,
 		 const char *encoding, int force_ellipses,
-		 const struct value_print_options *options) const override
+		 const value_print_options *options) const override
   {
     error (_("print string not implemented for language \"%s\""),
 	   natural_name ());
diff --git a/gdb/language.h b/gdb/language.h
index 75154d9c591..3330151ed36 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -499,13 +499,13 @@ struct language_defn
 
   /* Print a top-level value using syntax appropriate for this language.  */
   virtual void value_print (struct value *val, struct ui_file *stream,
-			    const struct value_print_options *options) const;
+			    const value_print_options *options) const;
 
   /* Print a value using syntax appropriate for this language.  RECURSE is
      the recursion depth.  It is zero-based.  */
   virtual void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const;
+	 const value_print_options *options) const;
 
   /* Parser function.  */
 
@@ -522,7 +522,7 @@ struct language_defn
   virtual void printstr (struct ui_file *stream, struct type *elttype,
 			 const gdb_byte *string, unsigned int length,
 			 const char *encoding, int force_ellipses,
-			 const struct value_print_options *options) const;
+			 const value_print_options *options) const;
 
 
   /* Print a typedef using syntax appropriate for this language.
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index de8edacbdaf..0fc84e5d4db 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -179,7 +179,7 @@ void
 m2_language::printstr (struct ui_file *stream, struct type *elttype,
 			const gdb_byte *string, unsigned int length,
 			const char *encoding, int force_ellipses,
-			const struct value_print_options *options) const
+			const value_print_options *options) const
 {
   m2_wchar_printer printer (elttype, '"', encoding);
   printer.print (stream, string, length, force_ellipses, 0, options);
diff --git a/gdb/m2-lang.h b/gdb/m2-lang.h
index 3492b4cd4fe..cf082a07e9b 100644
--- a/gdb/m2-lang.h
+++ b/gdb/m2-lang.h
@@ -84,7 +84,7 @@ class m2_language : public language_defn
 
   void value_print_inner (struct value *val, struct ui_file *stream,
 			  int recurse,
-			  const struct value_print_options *options) const override;
+			  const value_print_options *options) const override;
 
   /* See language.h.  */
 
@@ -100,7 +100,7 @@ class m2_language : public language_defn
   void printstr (struct ui_file *stream, struct type *elttype,
 		 const gdb_byte *string, unsigned int length,
 		 const char *encoding, int force_ellipses,
-		 const struct value_print_options *options) const override;
+		 const value_print_options *options) const override;
 
   /* See language.h.  */
 
diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c
index eb2be9d33a8..6bad4c95c08 100644
--- a/gdb/m2-valprint.c
+++ b/gdb/m2-valprint.c
@@ -31,12 +31,12 @@
 
 static int print_unpacked_pointer (struct type *type,
 				   CORE_ADDR address, CORE_ADDR addr,
-				   const struct value_print_options *options,
+				   const value_print_options *options,
 				   struct ui_file *stream);
 static void
 m2_print_array_contents (struct value *val,
 			 struct ui_file *stream, int recurse,
-			 const struct value_print_options *options,
+			 const value_print_options *options,
 			 int len);
 
 
@@ -157,7 +157,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr,
 static void
 m2_print_unbounded_array (struct value *value,
 			  struct ui_file *stream, int recurse,
-			  const struct value_print_options *options)
+			  const value_print_options *options)
 {
   CORE_ADDR addr;
   LONGEST len;
@@ -182,7 +182,7 @@ m2_print_unbounded_array (struct value *value,
 static int
 print_unpacked_pointer (struct type *type,
 			CORE_ADDR address, CORE_ADDR addr,
-			const struct value_print_options *options,
+			const value_print_options *options,
 			struct ui_file *stream)
 {
   struct gdbarch *gdbarch = type->arch ();
@@ -226,7 +226,7 @@ print_variable_at_address (struct type *type,
 			   const gdb_byte *valaddr,
 			   struct ui_file *stream,
 			   int recurse,
-			   const struct value_print_options *options)
+			   const value_print_options *options)
 {
   struct gdbarch *gdbarch = type->arch ();
   CORE_ADDR addr = unpack_pointer (type, valaddr);
@@ -257,7 +257,7 @@ print_variable_at_address (struct type *type,
 static void
 m2_print_array_contents (struct value *val,
 			 struct ui_file *stream, int recurse,
-			 const struct value_print_options *options,
+			 const value_print_options *options,
 			 int len)
 {
   struct type *type = check_typedef (val->type ());
@@ -300,7 +300,7 @@ static const struct generic_val_print_decorations m2_decorations =
 void
 m2_language::value_print_inner (struct value *val, struct ui_file *stream,
 				int recurse,
-				const struct value_print_options *options) const
+				const value_print_options *options) const
 {
   unsigned len;
   struct type *elttype;
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 3703e024786..b727255ea12 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -212,7 +212,7 @@ void
 pascal_language::printstr (struct ui_file *stream, struct type *elttype,
 			   const gdb_byte *string, unsigned int length,
 			   const char *encoding, int force_ellipses,
-			   const struct value_print_options *options) const
+			   const value_print_options *options) const
 {
   pascal_wchar_printer printer (elttype, '\'', encoding);
   printer.print (stream, string, length, force_ellipses, 0, options);
diff --git a/gdb/p-lang.h b/gdb/p-lang.h
index 046980b36be..4c80e1b21c4 100644
--- a/gdb/p-lang.h
+++ b/gdb/p-lang.h
@@ -95,13 +95,13 @@ class pascal_language : public language_defn
   /* See language.h.  */
 
   void value_print (struct value *val, struct ui_file *stream,
-		    const struct value_print_options *options) const override;
+		    const value_print_options *options) const override;
 
   /* See language.h.  */
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override;
+	 const value_print_options *options) const override;
 
   /* See language.h.  */
 
@@ -117,7 +117,7 @@ class pascal_language : public language_defn
   void printstr (struct ui_file *stream, struct type *elttype,
 		 const gdb_byte *string, unsigned int length,
 		 const char *encoding, int force_ellipses,
-		 const struct value_print_options *options) const override;
+		 const value_print_options *options) const override;
 
   /* See language.h.  */
 
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index f64c1069b53..4f94189b6e6 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -44,7 +44,7 @@
 
 static void pascal_object_print_value_fields (struct value *, struct ui_file *,
 					      int,
-					      const struct value_print_options *,
+					      const value_print_options *,
 					      struct type **, int);
 
 /* Decorations for Pascal.  */
@@ -66,7 +66,7 @@ static const struct generic_val_print_decorations p_decorations =
 void
 pascal_language::value_print_inner (struct value *val,
 				    struct ui_file *stream, int recurse,
-				    const struct value_print_options *options) const
+				    const value_print_options *options) const
 
 {
   struct type *type = check_typedef (val->type ());
@@ -407,10 +407,10 @@ pascal_language::value_print_inner (struct value *val,
 \f
 void
 pascal_language::value_print (struct value *val, struct ui_file *stream,
-			      const struct value_print_options *options) const
+			      const value_print_options *options) const
 {
   struct type *type = val->type ();
-  struct value_print_options opts = *options;
+  value_print_options opts = *options;
 
   opts.deref_ref = true;
 
@@ -456,10 +456,10 @@ static struct obstack dont_print_statmem_obstack;
 
 static void pascal_object_print_static_field (struct value *,
 					      struct ui_file *, int,
-					      const struct value_print_options *);
+					      const value_print_options *);
 
 static void pascal_object_print_value (struct value *, struct ui_file *, int,
-				       const struct value_print_options *,
+				       const value_print_options *,
 				       struct type **);
 
 /* It was changed to this after 2.4.5.  */
@@ -513,7 +513,7 @@ pascal_object_is_vtbl_member (struct type *type)
 static void
 pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
 				  int recurse,
-				  const struct value_print_options *options,
+				  const value_print_options *options,
 				  struct type **dont_print_vb,
 				  int dont_print_statmem)
 {
@@ -618,7 +618,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
 		}
 	      else
 		{
-		  struct value_print_options opts = *options;
+		  value_print_options opts = *options;
 
 		  v = value_field_bitfield (type, i, valaddr, 0, val);
 
@@ -650,7 +650,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
 		}
 	      else
 		{
-		  struct value_print_options opts = *options;
+		  value_print_options opts = *options;
 
 		  opts.deref_ref = false;
 
@@ -686,7 +686,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
 static void
 pascal_object_print_value (struct value *val, struct ui_file *stream,
 			   int recurse,
-			   const struct value_print_options *options,
+			   const value_print_options *options,
 			   struct type **dont_print_vb)
 {
   struct type **last_dont_print
@@ -813,10 +813,10 @@ static void
 pascal_object_print_static_field (struct value *val,
 				  struct ui_file *stream,
 				  int recurse,
-				  const struct value_print_options *options)
+				  const value_print_options *options)
 {
   struct type *type = val->type ();
-  struct value_print_options opts;
+  value_print_options opts;
 
   if (val->entirely_optimized_out ())
     {
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 9ebe563fed3..64df1030bb0 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -287,7 +287,7 @@ decode_format (const char **string_ptr, int oformat, int osize)
 
 static void
 print_formatted (struct value *val, int size,
-		 const struct value_print_options *options,
+		 const value_print_options *options,
 		 struct ui_file *stream)
 {
   struct type *type = check_typedef (val->type ());
@@ -363,7 +363,7 @@ float_type_from_length (struct type *type)
 
 void
 print_scalar_formatted (const gdb_byte *valaddr, struct type *type,
-			const struct value_print_options *options,
+			const value_print_options *options,
 			int size, struct ui_file *stream)
 {
   struct gdbarch *gdbarch = type->arch ();
@@ -493,7 +493,7 @@ print_scalar_formatted (const gdb_byte *valaddr, struct type *type,
       break;
     case 'c':
       {
-	struct value_print_options opts = *options;
+	value_print_options opts = *options;
 
 	if (!val_long.has_value ())
 	  val_long.emplace (unpack_long (type, valaddr));
@@ -762,7 +762,7 @@ pc_prefix (CORE_ADDR addr)
    Return non-zero if anything was printed; zero otherwise.  */
 
 int
-print_address_demangle (const struct value_print_options *opts,
+print_address_demangle (const value_print_options *opts,
 			struct gdbarch *gdbarch, CORE_ADDR addr,
 			struct ui_file *stream, int do_demangle)
 {
@@ -933,7 +933,7 @@ integer_is_zero (const gdb_byte *x, int len)
 static CORE_ADDR
 find_string_backward (struct gdbarch *gdbarch,
 		      CORE_ADDR addr, int count, int char_size,
-		      const struct value_print_options *options,
+		      const value_print_options *options,
 		      int *strings_counted)
 {
   const int chunk_size = 0x20;
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index 6e3012a3331..d095a9779db 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -221,7 +221,7 @@ py_print_type (struct ui_out *out, struct value *val)
 
 static void
 py_print_value (struct ui_out *out, struct value *val,
-		const struct value_print_options *opts,
+		const value_print_options *opts,
 		int indent,
 		enum ext_lang_frame_args args_type,
 		const struct language_defn *language)
@@ -304,7 +304,7 @@ py_print_single_arg (struct ui_out *out,
 		     const char *sym_name,
 		     struct frame_arg *fa,
 		     struct value *fv,
-		     const struct value_print_options *opts,
+		     const value_print_options *opts,
 		     enum ext_lang_frame_args args_type,
 		     int print_args_field,
 		     const struct language_defn *language)
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index a89bf073215..057d6b35aaf 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -42,7 +42,7 @@ enum gdbpy_string_repr_result
 
 /* If non-null, points to options that are in effect while
    printing.  */
-const struct value_print_options *gdbpy_current_print_options;
+const value_print_options *gdbpy_current_print_options;
 
 /* Helper function for find_pretty_printer which iterates over a list,
    calls each function and inspects output.  This will return a
@@ -281,7 +281,7 @@ print_stack_unless_memory_error (struct ui_file *stream)
 static enum gdbpy_string_repr_result
 print_string_repr (PyObject *printer, const char *hint,
 		   struct ui_file *stream, int recurse,
-		   const struct value_print_options *options,
+		   const value_print_options *options,
 		   const struct language_defn *language,
 		   struct gdbarch *gdbarch)
 {
@@ -299,7 +299,7 @@ print_string_repr (PyObject *printer, const char *hint,
 	  long length;
 	  struct type *type;
 	  gdb::unique_xmalloc_ptr<char> encoding;
-	  struct value_print_options local_opts = *options;
+	  value_print_options local_opts = *options;
 
 	  gdbpy_extract_lazy_string (py_str.get (), &addr, &type,
 				     &length, &encoding);
@@ -338,7 +338,7 @@ print_string_repr (PyObject *printer, const char *hint,
     }
   else if (replacement)
     {
-      struct value_print_options opts = *options;
+      value_print_options opts = *options;
 
       opts.addressprint = false;
       common_val_print (replacement, stream, recurse, &opts, language);
@@ -358,7 +358,7 @@ print_string_repr (PyObject *printer, const char *hint,
 static void
 print_children (PyObject *printer, const char *hint,
 		struct ui_file *stream, int recurse,
-		const struct value_print_options *options,
+		const value_print_options *options,
 		const struct language_defn *language,
 		int is_py_none)
 {
@@ -504,7 +504,7 @@ print_children (PyObject *printer, const char *hint,
 	  struct type *type;
 	  long length;
 	  gdb::unique_xmalloc_ptr<char> encoding;
-	  struct value_print_options local_opts = *options;
+	  value_print_options local_opts = *options;
 
 	  gdbpy_extract_lazy_string (py_v, &addr, &type, &length, &encoding);
 
@@ -536,7 +536,7 @@ print_children (PyObject *printer, const char *hint,
 	      /* When printing the key of a map we allow one additional
 		 level of depth.  This means the key will print before the
 		 value does.  */
-	      struct value_print_options opt = *options;
+	      value_print_options opt = *options;
 	      if (is_map && i % 2 == 0
 		  && opt.max_depth != -1
 		  && opt.max_depth < INT_MAX)
@@ -573,7 +573,7 @@ enum ext_lang_rc
 gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang,
 				struct value *value,
 				struct ui_file *stream, int recurse,
-				const struct value_print_options *options,
+				const value_print_options *options,
 				const struct language_defn *language)
 {
   struct type *type = value->type ();
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index f9899740a5f..d7acd873f0f 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -435,7 +435,7 @@ extern enum ext_lang_rc gdbpy_apply_val_pretty_printer
   (const struct extension_language_defn *,
    struct value *value,
    struct ui_file *stream, int recurse,
-   const struct value_print_options *options,
+   const value_print_options *options,
    const struct language_defn *language);
 extern void gdbpy_load_ptwrite_filter
   (const struct extension_language_defn *extlang,
@@ -975,7 +975,7 @@ PyObject *gdbpy_default_visualizer (PyObject *self, PyObject *args);
 
 PyObject *gdbpy_print_options (PyObject *self, PyObject *args);
 const value_print_options &gdbpy_get_print_options ();
-extern const struct value_print_options *gdbpy_current_print_options;
+extern const value_print_options *gdbpy_current_print_options;
 
 void bpfinishpy_pre_stop_hook (struct gdbpy_breakpoint_object *bp_obj);
 void bpfinishpy_post_stop_hook (struct gdbpy_breakpoint_object *bp_obj);
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index 517d6333d12..a4614e9874a 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -461,7 +461,7 @@ void
 rust_language::printstr (struct ui_file *stream, struct type *type,
 			 const gdb_byte *string, unsigned int length,
 			 const char *user_encoding, int force_ellipses,
-			 const struct value_print_options *options) const
+			 const value_print_options *options) const
 {
   /* Rust always uses UTF-8, but let the caller override this if need
      be.  */
@@ -518,7 +518,7 @@ rust_slice_to_array (struct value *val)
 void
 rust_language::val_print_slice
      (struct value *val, struct ui_file *stream, int recurse,
-      const struct value_print_options *options) const
+      const value_print_options *options) const
 {
   struct type *orig_type = check_typedef (val->type ());
 
@@ -558,7 +558,7 @@ rust_language::val_print_slice
 void
 rust_language::val_print_struct
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const
+	 const value_print_options *options) const
 {
   int first_field;
   struct type *type = check_typedef (val->type ());
@@ -571,7 +571,7 @@ rust_language::val_print_struct
 
   bool is_tuple = rust_tuple_type_p (type);
   bool is_tuple_struct = !is_tuple && rust_tuple_struct_type_p (type);
-  struct value_print_options opts;
+  value_print_options opts;
 
   if (!is_tuple)
     {
@@ -640,9 +640,9 @@ rust_language::val_print_struct
 void
 rust_language::print_enum (struct value *val, struct ui_file *stream,
 			   int recurse,
-			   const struct value_print_options *options) const
+			   const value_print_options *options) const
 {
-  struct value_print_options opts = *options;
+  value_print_options opts = *options;
   struct type *type = check_typedef (val->type ());
 
   opts.deref_ref = false;
@@ -714,9 +714,9 @@ rust_language::print_enum (struct value *val, struct ui_file *stream,
 void
 rust_language::value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const
+	 const value_print_options *options) const
 {
-  struct value_print_options opts = *options;
+  value_print_options opts = *options;
   opts.deref_ref = true;
 
   if (opts.prettyformat == Val_prettyformat_default)
@@ -826,7 +826,7 @@ rust_language::value_print_inner
 void
 rust_language::value_print
 	(struct value *val, struct ui_file *stream,
-	 const struct value_print_options *options) const
+	 const value_print_options *options) const
 {
   value_print_options opts = *options;
   opts.deref_ref = true;
diff --git a/gdb/rust-lang.h b/gdb/rust-lang.h
index c7a5bef0e0f..8e20d352394 100644
--- a/gdb/rust-lang.h
+++ b/gdb/rust-lang.h
@@ -137,12 +137,12 @@ class rust_language : public language_defn
 
   void value_print_inner
 	(struct value *val, struct ui_file *stream, int recurse,
-	 const struct value_print_options *options) const override;
+	 const value_print_options *options) const override;
 
   /* See language.h.  */
 
   void value_print (struct value *val, struct ui_file *stream,
-		    const struct value_print_options *options) const override;
+		    const value_print_options *options) const override;
 
   /* See language.h.  */
 
@@ -164,7 +164,7 @@ class rust_language : public language_defn
   void printstr (struct ui_file *stream, struct type *elttype,
 		 const gdb_byte *string, unsigned int length,
 		 const char *encoding, int force_ellipses,
-		 const struct value_print_options *options) const override;
+		 const value_print_options *options) const override;
 
   /* See language.h.  */
 
@@ -202,20 +202,20 @@ class rust_language : public language_defn
 
   void val_print_slice (struct value *val, struct ui_file *stream,
 			int recurse,
-			const struct value_print_options *options) const;
+			const value_print_options *options) const;
 
   /* Helper for value_print_inner, arguments are as for that function.
      Prints structs and untagged unions.  */
 
   void val_print_struct (struct value *val, struct ui_file *stream,
 			 int recurse,
-			 const struct value_print_options *options) const;
+			 const value_print_options *options) const;
 
   /* Helper for value_print_inner, arguments are as for that function.
      Prints discriminated unions (Rust enums).  */
 
   void print_enum (struct value *val, struct ui_file *stream, int recurse,
-		   const struct value_print_options *options) const;
+		   const value_print_options *options) const;
 };
 
 #endif /* GDB_RUST_LANG_H */
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 4ef50707bef..1873b5d58b3 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -70,7 +70,7 @@ static void val_print_type_code_flags (struct type *type,
 /* Start print_max_depth at this value. */
 #define PRINT_MAX_DEPTH_DEFAULT 20
 
-struct value_print_options user_print_options =
+value_print_options user_print_options =
 {
   Val_prettyformat_default,	/* prettyformat */
   false,			/* prettyformat_arrays */
@@ -409,7 +409,7 @@ val_print_invalid_address (struct ui_file *stream)
 static void
 print_unpacked_pointer (struct type *type, struct type *elttype,
 			CORE_ADDR address, struct ui_file *stream,
-			const struct value_print_options *options)
+			const value_print_options *options)
 {
   struct gdbarch *gdbarch = type->arch ();
 
@@ -432,7 +432,7 @@ print_unpacked_pointer (struct type *type, struct type *elttype,
 static void
 generic_val_print_array (struct value *val,
 			 struct ui_file *stream, int recurse,
-			 const struct value_print_options *options,
+			 const value_print_options *options,
 			 const struct
 			     generic_val_print_decorations *decorations)
 {
@@ -465,7 +465,7 @@ generic_val_print_array (struct value *val,
 static void
 generic_val_print_string (struct value *val,
 			  struct ui_file *stream, int recurse,
-			  const struct value_print_options *options,
+			  const value_print_options *options,
 			  const struct generic_val_print_decorations
 			    *decorations)
 {
@@ -534,7 +534,7 @@ generic_val_print_string (struct value *val,
 
 static void
 generic_value_print_ptr (struct value *val, struct ui_file *stream,
-			 const struct value_print_options *options)
+			 const value_print_options *options)
 {
 
   if (options->format && options->format != 's')
@@ -593,7 +593,7 @@ static void
 generic_val_print_ref (struct type *type,
 		       struct ui_file *stream, int recurse,
 		       struct value *original_value,
-		       const struct value_print_options *options)
+		       const value_print_options *options)
 {
   struct type *elttype = check_typedef (type->target_type ());
   struct value *deref_val = NULL;
@@ -737,7 +737,7 @@ generic_val_print_enum_1 (struct type *type, LONGEST val,
 static void
 generic_val_print_enum (struct type *type, struct ui_file *stream,
 			struct value *original_value,
-			const struct value_print_options *options)
+			const value_print_options *options)
 {
   gdb_assert (!options->format);
 
@@ -754,7 +754,7 @@ static void
 generic_val_print_func (struct type *type, CORE_ADDR address,
 			struct ui_file *stream,
 			struct value *original_value,
-			const struct value_print_options *options)
+			const value_print_options *options)
 {
   struct gdbarch *gdbarch = type->arch ();
 
@@ -775,12 +775,12 @@ generic_val_print_func (struct type *type, CORE_ADDR address,
 static void
 generic_value_print_bool
   (struct value *value, struct ui_file *stream,
-   const struct value_print_options *options,
+   const value_print_options *options,
    const struct generic_val_print_decorations *decorations)
 {
   if (options->format || options->output_format)
     {
-      struct value_print_options opts = *options;
+      value_print_options opts = *options;
       opts.format = (options->format ? options->format
 		     : options->output_format);
       value_print_scalar_formatted (value, &opts, 0, stream);
@@ -803,9 +803,9 @@ generic_value_print_bool
 
 static void
 generic_value_print_int (struct value *val, struct ui_file *stream,
-			 const struct value_print_options *options)
+			 const value_print_options *options)
 {
-  struct value_print_options opts = *options;
+  value_print_options opts = *options;
 
   opts.format = (options->format ? options->format
 		 : options->output_format);
@@ -816,11 +816,11 @@ generic_value_print_int (struct value *val, struct ui_file *stream,
 
 static void
 generic_value_print_char (struct value *value, struct ui_file *stream,
-			  const struct value_print_options *options)
+			  const value_print_options *options)
 {
   if (options->format || options->output_format)
     {
-      struct value_print_options opts = *options;
+      value_print_options opts = *options;
 
       opts.format = (options->format ? options->format
 		     : options->output_format);
@@ -847,7 +847,7 @@ generic_value_print_char (struct value *value, struct ui_file *stream,
 static void
 generic_val_print_float (struct type *type, struct ui_file *stream,
 			 struct value *original_value,
-			 const struct value_print_options *options)
+			 const value_print_options *options)
 {
   gdb_assert (!options->format);
 
@@ -860,7 +860,7 @@ generic_val_print_float (struct type *type, struct ui_file *stream,
 
 static void
 generic_val_print_fixed_point (struct value *val, struct ui_file *stream,
-			       const struct value_print_options *options)
+			       const value_print_options *options)
 {
   if (options->format)
     value_print_scalar_formatted (val, options, 0, stream);
@@ -885,7 +885,7 @@ generic_val_print_fixed_point (struct value *val, struct ui_file *stream,
 
 static void
 generic_value_print_complex (struct value *val, struct ui_file *stream,
-			     const struct value_print_options *options,
+			     const value_print_options *options,
 			     const struct generic_val_print_decorations
 			       *decorations)
 {
@@ -906,7 +906,7 @@ static void
 generic_value_print_memberptr
   (struct value *val, struct ui_file *stream,
    int recurse,
-   const struct value_print_options *options,
+   const value_print_options *options,
    const struct generic_val_print_decorations *decorations)
 {
   if (!options->format)
@@ -923,7 +923,7 @@ generic_value_print_memberptr
 
 void
 generic_value_print (struct value *val, struct ui_file *stream, int recurse,
-		     const struct value_print_options *options,
+		     const value_print_options *options,
 		     const struct generic_val_print_decorations *decorations)
 {
   struct type *type = val->type ();
@@ -1053,7 +1053,7 @@ generic_value_print (struct value *val, struct ui_file *stream, int recurse,
 
 void
 common_val_print (struct value *value, struct ui_file *stream, int recurse,
-		  const struct value_print_options *options,
+		  const value_print_options *options,
 		  const struct language_defn *language)
 {
   if (language->la_language == language_ada)
@@ -1066,7 +1066,7 @@ common_val_print (struct value *value, struct ui_file *stream, int recurse,
   if (value->lazy ())
     value->fetch_lazy ();
 
-  struct value_print_options local_opts = *options;
+  value_print_options local_opts = *options;
   struct type *type = value->type ();
   struct type *real_type = check_typedef (type);
 
@@ -1124,7 +1124,7 @@ common_val_print (struct value *value, struct ui_file *stream, int recurse,
 
 bool
 val_print_check_max_depth (struct ui_file *stream, int recurse,
-			   const struct value_print_options *options,
+			   const value_print_options *options,
 			   const struct language_defn *language)
 {
   if (options->max_depth > -1 && recurse >= options->max_depth)
@@ -1143,7 +1143,7 @@ val_print_check_max_depth (struct ui_file *stream, int recurse,
 
 static bool
 value_check_printable (struct value *val, struct ui_file *stream,
-		       const struct value_print_options *options)
+		       const value_print_options *options)
 {
   if (val == 0)
     {
@@ -1192,7 +1192,7 @@ value_check_printable (struct value *val, struct ui_file *stream,
 void
 common_val_print_checked (struct value *val, struct ui_file *stream,
 			  int recurse,
-			  const struct value_print_options *options,
+			  const value_print_options *options,
 			  const struct language_defn *language)
 {
   if (!value_check_printable (val, stream, options))
@@ -1205,7 +1205,7 @@ common_val_print_checked (struct value *val, struct ui_file *stream,
 
 void
 value_print (struct value *val, struct ui_file *stream,
-	     const struct value_print_options *options)
+	     const value_print_options *options)
 {
   scoped_value_mark free_values;
 
@@ -1291,7 +1291,7 @@ val_print_type_code_flags (struct type *type, struct value *original_value,
 
 void
 value_print_scalar_formatted (struct value *val,
-			      const struct value_print_options *options,
+			      const value_print_options *options,
 			      int size,
 			      struct ui_file *stream)
 {
@@ -1304,7 +1304,7 @@ value_print_scalar_formatted (struct value *val,
      again.  */
   if (options->format == 's')
     {
-      struct value_print_options opts = *options;
+      value_print_options opts = *options;
       opts.format = 0;
       opts.deref_ref = false;
       common_val_print (val, stream, 0, &opts, current_language);
@@ -1414,7 +1414,7 @@ print_floating (const gdb_byte *valaddr, struct type *type,
 void
 print_binary_chars (struct ui_file *stream, const gdb_byte *valaddr,
 		    unsigned len, enum bfd_endian byte_order, bool zero_pad,
-		    const struct value_print_options *options)
+		    const value_print_options *options)
 {
   const gdb_byte *p;
   unsigned int i;
@@ -1916,7 +1916,7 @@ print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr,
    stream STREAM.  */
 
 void
-print_function_pointer_address (const struct value_print_options *options,
+print_function_pointer_address (const value_print_options *options,
 				struct gdbarch *gdbarch,
 				CORE_ADDR address,
 				struct ui_file *stream)
@@ -1943,7 +1943,7 @@ print_function_pointer_address (const struct value_print_options *options,
 void
 maybe_print_array_index (struct type *index_type, LONGEST index,
 			 struct ui_file *stream,
-			 const struct value_print_options *options)
+			 const value_print_options *options)
 {
   if (!options->print_array_indexes)
     return;
@@ -1956,7 +1956,7 @@ maybe_print_array_index (struct type *index_type, LONGEST index,
 void
 value_print_array_elements (struct value *val, struct ui_file *stream,
 			    int recurse,
-			    const struct value_print_options *options,
+			    const value_print_options *options,
 			    unsigned int i)
 {
   unsigned int things_printed = 0;
@@ -2112,7 +2112,7 @@ generic_printstr (struct ui_file *stream, struct type *type,
 		  const gdb_byte *string, unsigned int length,
 		  const char *encoding, int force_ellipses,
 		  int quote_char, int c_style_terminator,
-		  const struct value_print_options *options)
+		  const value_print_options *options)
 {
   wchar_printer printer (type, quote_char, encoding);
   printer.print (stream, string, length, force_ellipses,
@@ -2131,7 +2131,7 @@ int
 val_print_string (struct type *elttype, const char *encoding,
 		  CORE_ADDR addr, int len,
 		  struct ui_file *stream,
-		  const struct value_print_options *options)
+		  const value_print_options *options)
 {
   int force_ellipsis = 0;	/* Force ellipsis to be printed if nonzero.  */
   int err;			/* Non-zero if we got a bad read.  */
diff --git a/gdb/valprint.h b/gdb/valprint.h
index e743c39dca5..8c4c601b16d 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -128,7 +128,7 @@ struct value_print_options
 /* Return the character count limit for printing strings.  */
 
 static inline unsigned int
-get_print_max_chars (const struct value_print_options *options)
+get_print_max_chars (const value_print_options *options)
 {
   return (options->print_max_chars != PRINT_MAX_CHARS_ELEMENTS
 	  ? options->print_max_chars : options->print_max);
@@ -142,7 +142,7 @@ extern gdb::option::option_def_group make_value_print_options_def_group
 /* The global print options set by the user.  In general this should
    not be directly accessed, except by set/show commands.  Ordinary
    code should call get_user_print_options instead.  */
-extern struct value_print_options user_print_options;
+extern value_print_options user_print_options;
 
 /* Accessor for the user print options.  */
 
@@ -163,13 +163,13 @@ extern value_print_options get_formatted_print_options (char format);
 
 extern void maybe_print_array_index (struct type *index_type, LONGEST index,
 				     struct ui_file *stream,
-				     const struct value_print_options *);
+				     const value_print_options *);
 
 
 /* Print elements of an array.  */
 
 extern void value_print_array_elements (struct value *, struct ui_file *, int,
-					const struct value_print_options *,
+					const value_print_options *,
 					unsigned int);
 
 /* Print a scalar according to OPTIONS and SIZE on STREAM.  Format 'i'
@@ -179,12 +179,12 @@ extern void value_print_array_elements (struct value *, struct ui_file *, int,
    with a format.  */
 
 extern void value_print_scalar_formatted
-  (struct value *val, const struct value_print_options *options,
+  (struct value *val, const value_print_options *options,
    int size, struct ui_file *stream);
 
 extern void print_binary_chars (struct ui_file *, const gdb_byte *,
 				unsigned int, enum bfd_endian, bool,
-				const struct value_print_options *options);
+				const value_print_options *options);
 
 extern void print_octal_chars (struct ui_file *, const gdb_byte *,
 			       unsigned int, enum bfd_endian);
@@ -195,7 +195,7 @@ extern void print_decimal_chars (struct ui_file *, const gdb_byte *,
 extern void print_hex_chars (struct ui_file *, const gdb_byte *,
 			     unsigned int, enum bfd_endian, bool);
 
-extern void print_function_pointer_address (const struct value_print_options *options,
+extern void print_function_pointer_address (const value_print_options *options,
 					    struct gdbarch *gdbarch,
 					    CORE_ADDR address,
 					    struct ui_file *stream);
@@ -259,7 +259,7 @@ struct generic_val_print_decorations
 
 extern void generic_value_print (struct value *val, struct ui_file *stream,
 				 int recurse,
-				 const struct value_print_options *options,
+				 const value_print_options *options,
 				 const struct generic_val_print_decorations *d);
 
 extern void generic_emit_char (int c, struct type *type, struct ui_file *stream,
@@ -269,7 +269,7 @@ extern void generic_printstr (struct ui_file *stream, struct type *type,
 			      const gdb_byte *string, unsigned int length,
 			      const char *encoding, int force_ellipses,
 			      int quote_char, int c_style_terminator,
-			      const struct value_print_options *options);
+			      const value_print_options *options);
 
 /* Run the "output" command.  ARGS and FROM_TTY are the usual
    arguments passed to all command implementations, except ARGS is
@@ -335,7 +335,7 @@ extern int build_address_symbolic (struct gdbarch *,
    LANGUAGE determines what type of ellipsis expression is printed.  */
 
 extern bool val_print_check_max_depth (struct ui_file *stream, int recurse,
-				       const struct value_print_options *opts,
+				       const value_print_options *opts,
 				       const struct language_defn *language);
 
 /* Like common_val_print, but call value_check_printable first.  */
@@ -343,7 +343,7 @@ extern bool val_print_check_max_depth (struct ui_file *stream, int recurse,
 extern void common_val_print_checked
   (struct value *val,
    struct ui_file *stream, int recurse,
-   const struct value_print_options *options,
+   const value_print_options *options,
    const struct language_defn *language);
 
 #endif /* GDB_VALPRINT_H */
diff --git a/gdb/value.h b/gdb/value.h
index e94c69e49d3..3651a089fd2 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -1051,7 +1051,7 @@ struct value *value_vector_widen (struct value *scalar_value,
 class frame_info_ptr;
 struct fn_field;
 
-extern int print_address_demangle (const struct value_print_options *,
+extern int print_address_demangle (const value_print_options *,
 				   struct gdbarch *, CORE_ADDR,
 				   struct ui_file *, int);
 
@@ -1557,7 +1557,7 @@ extern void print_floating (const gdb_byte *valaddr, struct type *type,
 			    struct ui_file *stream);
 
 extern void value_print (struct value *val, struct ui_file *stream,
-			 const struct value_print_options *options);
+			 const value_print_options *options);
 
 /* Release values from the value chain and return them.  Values
    created after MARK are released.  If MARK is nullptr, or if MARK is
@@ -1570,13 +1570,13 @@ extern std::vector<value_ref_ptr> value_release_to_mark
 
 extern void common_val_print (struct value *val,
 			      struct ui_file *stream, int recurse,
-			      const struct value_print_options *options,
+			      const value_print_options *options,
 			      const struct language_defn *language);
 
 extern int val_print_string (struct type *elttype, const char *encoding,
 			     CORE_ADDR addr, int len,
 			     struct ui_file *stream,
-			     const struct value_print_options *options);
+			     const value_print_options *options);
 
 /* Print the value in stack frame FRAME of a variable specified by a
    struct symbol.  STREAM is the ui_file on which to print the value.

-- 
2.49.0


  parent reply	other threads:[~2026-07-04 22:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-04 22:05 [PATCH 0/9] Some cleanups and C++-ification of value_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 1/9] Return value_print_options from get_formatted_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 2/9] Return value_print_options from get_no_prettyformat_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 3/9] Convert get_user_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 4/9] Return a const reference from gdbpy_get_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 5/9] Return value_print_options from varobj_formatted_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 6/9] Use 'const' with some value_print_options Tom Tromey
2026-07-04 22:05 ` Tom Tromey [this message]
2026-07-04 22:05 ` [PATCH 8/9] Use std::forward in fortran_array_walker Tom Tromey
2026-07-04 22:05 ` [PATCH 9/9] Use references for value_print_options Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260704-print-opts-cleanup-v1-7-fb54a5112a8d@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox