Fix "enumeration values not handled in switch" error in testsuite
[deliverable/binutils-gdb.git] / gdb / ax-gdb.c
index 0f389e49cb7e50275de46f7797b79b502985827a..54643dd79ba33a22454f47f7fec48c27aa461c16 100644 (file)
@@ -316,9 +316,9 @@ gen_trace_static_fields (struct agent_expr *ax,
 
   type = check_typedef (type);
 
-  for (i = TYPE_NFIELDS (type) - 1; i >= nbases; i--)
+  for (i = type->num_fields () - 1; i >= nbases; i--)
     {
-      if (field_is_static (&TYPE_FIELD (type, i)))
+      if (field_is_static (&type->field (i)))
        {
          gen_static_field (ax, &value, type, i);
          if (value.optimized_out)
@@ -1444,7 +1444,7 @@ gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value,
 
   type = check_typedef (type);
 
-  for (i = TYPE_NFIELDS (type) - 1; i >= nbases; i--)
+  for (i = type->num_fields () - 1; i >= nbases; i--)
     {
       const char *this_name = TYPE_FIELD_NAME (type, i);
 
@@ -1456,7 +1456,7 @@ gen_struct_ref_recursive (struct agent_expr *ax, struct axs_value *value,
                 "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 (type, i)))
+             if (field_is_static (&type->field (i)))
                {
                  gen_static_field (ax, value, type, i);
                  if (value->optimized_out)
@@ -1588,13 +1588,13 @@ gen_struct_elt_for_reference (struct agent_expr *ax, struct axs_value *value,
     internal_error (__FILE__, __LINE__,
                    _("non-aggregate type to gen_struct_elt_for_reference"));
 
-  for (i = TYPE_NFIELDS (t) - 1; i >= TYPE_N_BASECLASSES (t); i--)
+  for (i = t->num_fields () - 1; i >= TYPE_N_BASECLASSES (t); i--)
     {
       const char *t_field_name = TYPE_FIELD_NAME (t, i);
 
       if (t_field_name && strcmp (t_field_name, fieldname) == 0)
        {
-         if (field_is_static (&TYPE_FIELD (t, i)))
+         if (field_is_static (&t->field (i)))
            {
              gen_static_field (ax, value, t, i);
              if (value->optimized_out)
This page took 0.037043 seconds and 4 git commands to generate.