[PATCH 3/4] Remove variable_default_display

Tom Tromey tromey@adacore.com
Fri Sep 1 14:47:13 GMT 2023


variable_default_display has a single caller now, so remove it.
---
 gdb/varobj.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/gdb/varobj.c b/gdb/varobj.c
index 760809c6f51..3ae8d728e82 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -164,8 +164,6 @@ create_child_with_value (struct varobj *parent, int index,
 
 /* Utility routines */
 
-static enum varobj_display_formats variable_default_display (struct varobj *);
-
 static bool update_type_if_necessary (struct varobj *var,
 				      struct value *new_value);
 
@@ -336,7 +334,7 @@ varobj_create (const char *objname,
 	  return NULL;
 	}
 
-      var->format = variable_default_display (var.get ());
+      var->format = FORMAT_NATURAL;
       var->root->valid_block =
 	var->root->floating ? NULL : tracker.block ();
       var->root->global
@@ -1871,14 +1869,6 @@ varobj_get_value_type (const struct varobj *var)
   return type;
 }
 
-/* What is the default display for this variable? We assume that
-   everything is "natural".  Any exceptions?  */
-static enum varobj_display_formats
-variable_default_display (struct varobj *var)
-{
-  return FORMAT_NATURAL;
-}
-
 /*
  * Language-dependencies
  */

-- 
2.40.1



More information about the Gdb-patches mailing list