for (int i = 0; i < type->num_fields (); i++)
          {
            /* Ignore any static fields.  */
-           if (field_is_static (&type->field (i)))
+           if (type->field (i).is_static ())
              continue;
 
            struct type *member = check_typedef (type->field (i).type ());
       for (int i = 0; i < arg_type->num_fields (); i++)
        {
          /* Don't include static fields.  */
-         if (field_is_static (&arg_type->field (i)))
+         if (arg_type->field (i).is_static ())
            continue;
 
          struct value *field = arg->primitive_field (0, i, arg_type);
 
          /* Ignore static fields, empty fields (for example nested
             empty structures), and bitfields (these are handled by
             the caller).  */
-         if (field_is_static (&type->field (i))
+         if (type->field (i).is_static ()
              || (TYPE_FIELD_BITSIZE (type, i) == 0
                  && subtype->length () == 0)
              || TYPE_FIELD_PACKED (type, i))
 
   /* Ignore static fields, or empty fields, for example nested
      empty structures.*/
-  if (field_is_static (&type->field (i)) || bitsize == 0)
+  if (type->field (i).is_static () || bitsize == 0)
     return;
 
   int bitpos = bitoffset + type->field (i).loc_bitpos ();
 
          {
            int sub_count = 0;
 
-           if (!field_is_static (&t->field (i)))
+           if (!t->field (i).is_static ())
              sub_count = arm_vfp_cprc_sub_candidate (t->field (i).type (),
                                                      base_type);
            if (sub_count == -1)
 
 
   for (i = type->num_fields () - 1; i >= nbases; i--)
     {
-      if (field_is_static (&type->field (i)))
+      if (type->field (i).is_static ())
        {
          gen_static_field (ax, &value, type, i);
          if (value.optimized_out)
                 "this") will have been generated already, which will
                 be unnecessary but not harmful if the static field is
                 being handled as a global.  */
-             if (field_is_static (&type->field (i)))
+             if (type->field (i).is_static ())
                {
                  gen_static_field (ax, value, type, i);
                  if (value->optimized_out)
 
       if (t_field_name && strcmp (t_field_name, fieldname) == 0)
        {
-         if (field_is_static (&t->field (i)))
+         if (t->field (i).is_static ())
            {
              gen_static_field (ax, value, t, i);
              if (value->optimized_out)
 
                 TYPE_FIELD_PRIVATE (type, i), flags);
            }
 
-         bool is_static = field_is_static (&type->field (i));
+         bool is_static = type->field (i).is_static ();
 
          if (flags->print_offsets)
            podata->update (type, i, stream);
 
 
   try
     {
-      if (field_is_static (&type->field (type_index)))
+      if (type->field (type_index).is_static ())
        result = value_static_field (type, type_index);
       else
        result = value->primitive_field (0, type_index, type);
 
        int i;
 
        for (i = 0; i < type->num_fields (); ++i)
-         if (!field_is_static (&type->field (i)))
+         if (!type->field (i).is_static ())
            generate_vla_size (compiler, stream, gdbarch, registers_used, pc,
                               type->field (i).type (), sym);
       }
 
       gcc_type field_type
        = instance->convert_type (type->field (i).type ());
 
-      if (field_is_static (&type->field (i)))
+      if (type->field (i).is_static ())
        {
          CORE_ADDR physaddr;
 
 
 
          /* If requested, skip printing of static fields.  */
          if (!options->static_field_print
-             && field_is_static (&type->field (i)))
+             && type->field (i).is_static ())
            continue;
 
          if (fields_seen)
 
          annotate_field_begin (type->field (i).type ());
 
-         if (field_is_static (&type->field (i)))
+         if (type->field (i).is_static ())
            {
              gdb_puts ("static ", stream);
              fprintf_symbol (stream,
            }
          annotate_field_value ();
 
-         if (!field_is_static (&type->field (i))
+         if (!type->field (i).is_static ()
              && TYPE_FIELD_PACKED (type, i))
            {
              struct value *v;
                  fputs_styled ("<optimized out or zero length>",
                                metadata_style.style (), stream);
                }
-             else if (field_is_static (&type->field (i)))
+             else if (type->field (i).is_static ())
                {
                  try
                    {
   for (i = TYPE_N_BASECLASSES (self); i < len; i++)
     {
       field &f = self->field (i);
-      if (field_is_static (&f))
+      if (f.is_static ())
        continue;
       LONGEST bitpos = f.loc_bitpos ();
 
 
       fieldno++;
       /* Skip static fields.  */
       while (fieldno < struct_type->num_fields ()
-            && field_is_static (&struct_type->field (fieldno)))
+            && struct_type->field (fieldno).is_static ())
        fieldno++;
       if (fieldno >= struct_type->num_fields ())
        error (_("too many initializers"));
 
        for (i = 0; i < type->num_fields (); ++i)
          {
            /* Static fields can be ignored here.  */
-           if (field_is_static (&type->field (i)))
+           if (type->field (i).is_static ())
              continue;
            /* If the field has dynamic type, then so does TYPE.  */
            if (is_dynamic_type_internal (type->field (i).type (), 0))
     {
       struct type *t;
 
-      if (field_is_static (&type->field (i)))
+      if (type->field (i).is_static ())
        continue;
 
       t = resolve_dynamic_type_internal (resolved_type->field (i).type (),
       unsigned new_bit_length;
       struct property_addr_info pinfo;
 
-      if (field_is_static (&resolved_type->field (i)))
+      if (resolved_type->field (i).is_static ())
        continue;
 
       if (resolved_type->field (i).loc_kind () == FIELD_LOC_KIND_DWARF_BLOCK)
        int number_of_non_static_fields = 0;
        for (unsigned i = 0; i < type->num_fields (); ++i)
          {
-           if (!field_is_static (&type->field (i)))
+           if (!type->field (i).is_static ())
              {
                number_of_non_static_fields++;
                ULONGEST f_align = type_align (type->field (i).type ());
     }
 }
 
-int
-field_is_static (struct field *f)
-{
-  /* "static" fields are the fields whose location is not relative
-     to the address of the enclosing struct.  It would be nice to
-     have a dedicated flag that would be set for static fields when
-     the type is being created.  But in practice, checking the field
-     loc_kind should give us an accurate answer.  */
-  return (f->loc_kind () == FIELD_LOC_KIND_PHYSNAME
-         || f->loc_kind () == FIELD_LOC_KIND_PHYSADDR);
-}
-
 static void
 dump_fn_fieldlists (struct type *type, int spaces)
 {
 
     m_name = name;
   }
 
+  /* Return true if this field is static; false if not.  */
+  bool is_static () const
+  {
+    /* "static" fields are the fields whose location is not relative
+       to the address of the enclosing struct.  It would be nice to
+       have a dedicated flag that would be set for static fields when
+       the type is being created.  But in practice, checking the field
+       loc_kind should give us an accurate answer.  */
+    return (m_loc_kind == FIELD_LOC_KIND_PHYSNAME
+           || m_loc_kind == FIELD_LOC_KIND_PHYSADDR);
+  }
+
   /* Location getters / setters.  */
 
   field_loc_kind loc_kind () const
 
 extern void recursive_dump_type (struct type *, int);
 
-extern int field_is_static (struct field *);
-
 /* printcmd.c */
 
 extern void print_scalar_formatted (const gdb_byte *, struct type *,
 
      about recursive loops here, since we are only looking at members
      of complete class type.  Also ignore any static members.  */
   for (fieldnum = 0; fieldnum < type->num_fields (); fieldnum++)
-    if (!field_is_static (&type->field (fieldnum)))
+    if (!type->field (fieldnum).is_static ())
       {
        struct type *field_type = type->field (fieldnum).type ();
 
 
       int i;
       for (i = 0; i < type->num_fields (); i++)
        {
-         if (field_is_static (&type->field (i)))
+         if (type->field (i).is_static ())
            continue;
          if (i386_16_byte_align_p (type->field (i).type ()))
            return 1;
 
   for (int i = 0; i < type->num_fields (); i++)
     {
       /* Ignore any static fields.  */
-      if (field_is_static (&type->field (i)))
+      if (type->field (i).is_static ())
        continue;
 
       struct type *field_type = check_typedef (type->field (i).type ());
 
       struct type *field_type;
 
       /* We're only looking at normal fields.  */
-      if (field_is_static (&arg_type->field (i))
+      if (arg_type->field (i).is_static ()
          || (arg_type->field (i).loc_bitpos () % 8) != 0)
        continue;
 
 
                }
 
              print_spaces (level + 4, stream);
-             if (field_is_static (&type->field (i)))
+             if (type->field (i).is_static ())
                gdb_printf (stream, "static ");
              print_type (type->field (i).type (),
                                 type->field (i).name (),
                                 stream, show - 1, level + 4, flags);
-             if (!field_is_static (&type->field (i))
+             if (!type->field (i).is_static ()
                  && TYPE_FIELD_PACKED (type, i))
                {
                  /* It is a bitfield.  This code does not attempt
 
        {
          /* If requested, skip printing of static fields.  */
          if (!options->pascal_static_field_print
-             && field_is_static (&type->field (i)))
+             && type->field (i).is_static ())
            continue;
          if (fields_seen)
            gdb_printf (stream, ", ");
 
          annotate_field_begin (type->field (i).type ());
 
-         if (field_is_static (&type->field (i)))
+         if (type->field (i).is_static ())
            {
              gdb_puts ("static ", stream);
              fprintf_symbol (stream,
          gdb_puts (" = ", stream);
          annotate_field_value ();
 
-         if (!field_is_static (&type->field (i))
+         if (!type->field (i).is_static ()
              && TYPE_FIELD_PACKED (type, i))
            {
              struct value *v;
                  fputs_styled ("<optimized out or zero length>",
                                metadata_style.style (), stream);
                }
-             else if (field_is_static (&type->field (i)))
+             else if (type->field (i).is_static ())
                {
                  /* struct value *v = value_static_field (type, i);
                     v4.17 specific.  */
 
            {
              LONGEST sub_count;
 
-             if (field_is_static (&type->field (i)))
+             if (type->field (i).is_static ())
                continue;
 
              sub_count = ppc64_aggregate_candidate
 
   if (PyObject_SetAttrString (result.get (), "parent_type", arg.get ()) < 0)
     return NULL;
 
-  if (!field_is_static (&type->field (field)))
+  if (!type->field (field).is_static ())
     {
       const char *attrstring;
 
 
     return false;
   for (i = 0; i < type->num_fields (); ++i)
     {
-      if (!field_is_static (&type->field (i)))
+      if (!type->field (i).is_static ())
        {
          char buf[20];
 
   first_field = 1;
   for (i = 0; i < type->num_fields (); ++i)
     {
-      if (field_is_static (&type->field (i)))
+      if (type->field (i).is_static ())
        continue;
 
       if (!first_field)
   std::vector<int> fields;
   for (int i = 0; i < type->num_fields (); ++i)
     {
-      if (field_is_static (&type->field (i)))
+      if (type->field (i).is_static ())
        continue;
       if (is_enum && TYPE_FIELD_ARTIFICIAL (type, i))
        continue;
     {
       QUIT;
 
-      gdb_assert (!field_is_static (&type->field (i)));
+      gdb_assert (!type->field (i).is_static ());
       gdb_assert (! (is_enum && TYPE_FIELD_ARTIFICIAL (type, i)));
 
       if (flags->print_offsets)
 
        {
          struct field f = type->field (i);
 
-         if (field_is_static (&f))
+         if (f.is_static ())
            continue;
          if (inner != NULL)
            return type;
 
 print_offset_data::update (struct type *type, unsigned int field_idx,
                           struct ui_file *stream)
 {
-  if (field_is_static (&type->field (field_idx)))
+  if (type->field (field_idx).is_static ())
     {
       print_spaces (indentation, stream);
       return;
 
          {
            struct value *v;
 
-           if (field_is_static (&type->field (i)))
+           if (type->field (i).is_static ())
              v = value_static_field (type, i);
            else
              v = arg1->primitive_field (offset, i, type);
 
   for (i = TYPE_N_BASECLASSES (t); i < t->num_fields (); i++)
     {
-      if (!field_is_static (&t->field (i))
+      if (!t->field (i).is_static ()
          && bitpos == t->field (i).loc_bitpos ()
          && types_equal (ftype, t->field (i).type ()))
        return (*argp)->primitive_field (0, i, t);
 
       if (t_field_name && strcmp (t_field_name, name) == 0)
        {
-         if (field_is_static (&t->field (i)))
+         if (t->field (i).is_static ())
            {
              struct value *v = value_static_field (t, i);
              if (want_address)