* remote-mips.c (mips_request): Use unsigned long during parsing
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 5cac8d5eefbe3314ea949f8bcaee516f2714e3aa..f4edef80439dcf4bdc8e8d03b4644354002cb295 100644 (file)
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 int vtblprint;                 /* Controls printing of vtbl's */
 int objectprint;               /* Controls looking up an object's derived type
                                   using what we find in its vtables.  */
-static int static_field_print; /* Controls printing of static fields. */
+int static_field_print;        /* Controls printing of static fields. */
 
 static struct obstack dont_print_vb_obstack;
 static struct obstack dont_print_statmem_obstack;
@@ -333,20 +333,13 @@ cp_print_value_fields (type, valaddr, address, stream, format, recurse, pretty,
                }
              else if (TYPE_FIELD_STATIC (type, i))
                {
-                 value_ptr v;
-                 char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, i);
-                 struct symbol *sym =
-                     lookup_symbol (phys_name, 0, VAR_NAMESPACE, 0, NULL);
-                 if (sym == NULL)
+                 value_ptr v = value_static_field (type, i);
+                 if (v == NULL)
                    fputs_filtered ("<optimized out>", stream);
                  else
-                   {
-                     v = value_at (TYPE_FIELD_TYPE (type, i),
-                                   SYMBOL_VALUE_ADDRESS (sym));
-                     cp_print_static_field (TYPE_FIELD_TYPE (type, i), v,
-                                            stream, format, recurse + 1,
-                                            pretty);
-                   }
+                   cp_print_static_field (TYPE_FIELD_TYPE (type, i), v,
+                                          stream, format, recurse + 1,
+                                          pretty);
                }
              else
                {
This page took 0.024673 seconds and 4 git commands to generate.