Use gdb_bfd_sections in get_stap_base_address
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 1fb7edd5b0531fc8ac4404318c267c04568bdc81..819736dac9ea9412866ea08011f8797ada6df09e 100644 (file)
@@ -149,7 +149,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
     }
 
   fprintf_filtered (stream, "{");
-  len = TYPE_NFIELDS (type);
+  len = type->num_fields ();
   n_baseclasses = TYPE_N_BASECLASSES (type);
 
   /* First, print out baseclasses such that we don't print
@@ -191,7 +191,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
 
          /* If requested, skip printing of static fields.  */
          if (!options->static_field_print
-             && field_is_static (&TYPE_FIELD (type, i)))
+             && field_is_static (&type->field (i)))
            continue;
 
          if (fields_seen)
@@ -223,9 +223,9 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
              wrap_here (n_spaces (2 + 2 * recurse));
            }
 
-         annotate_field_begin (TYPE_FIELD_TYPE (type, i));
+         annotate_field_begin (type->field (i).type ());
 
-         if (field_is_static (&TYPE_FIELD (type, i)))
+         if (field_is_static (&type->field (i)))
            {
              fputs_filtered ("static ", stream);
              fprintf_symbol_filtered (stream,
@@ -256,7 +256,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
            }
          annotate_field_value ();
 
-         if (!field_is_static (&TYPE_FIELD (type, i))
+         if (!field_is_static (&type->field (i))
              && TYPE_FIELD_PACKED (type, i))
            {
              struct value *v;
@@ -295,13 +295,13 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
                  fputs_styled ("<optimized out or zero length>",
                                metadata_style.style (), stream);
                }
-             else if (field_is_static (&TYPE_FIELD (type, i)))
+             else if (field_is_static (&type->field (i)))
                {
                  try
                    {
                      struct value *v = value_static_field (type, i);
 
-                     cp_print_static_field (TYPE_FIELD_TYPE (type, i),
+                     cp_print_static_field (type->field (i).type (),
                                             v, stream, recurse + 1,
                                             opts);
                    }
@@ -315,7 +315,7 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
              else if (i == vptr_fieldno && type == vptr_basetype)
                {
                  int i_offset = TYPE_FIELD_BITPOS (type, i) / 8;
-                 struct type *i_type = TYPE_FIELD_TYPE (type, i);
+                 struct type *i_type = type->field (i).type ();
 
                  if (valprint_check_validity (stream, i_type, i_offset, val))
                    {
@@ -499,8 +499,8 @@ cp_print_value (struct value *val, struct ui_file *stream,
              && recurse >= options->max_depth)
            {
              const struct language_defn *language = current_language;
-             gdb_assert (language->la_struct_too_deep_ellipsis != NULL);
-             fputs_filtered (language->la_struct_too_deep_ellipsis, stream);
+             gdb_assert (language->struct_too_deep_ellipsis () != NULL);
+             fputs_filtered (language->struct_too_deep_ellipsis (), stream);
            }
          else
            {
@@ -638,7 +638,7 @@ cp_find_class_member (struct type **self_p, int *fieldno,
 
   *self_p = check_typedef (*self_p);
   self = *self_p;
-  len = TYPE_NFIELDS (self);
+  len = self->num_fields ();
 
   for (i = TYPE_N_BASECLASSES (self); i < len; i++)
     {
@@ -655,11 +655,11 @@ cp_find_class_member (struct type **self_p, int *fieldno,
   for (i = 0; i < TYPE_N_BASECLASSES (self); i++)
     {
       LONGEST bitpos = TYPE_FIELD_BITPOS (self, i);
-      LONGEST bitsize = 8 * TYPE_LENGTH (TYPE_FIELD_TYPE (self, i));
+      LONGEST bitsize = 8 * TYPE_LENGTH (self->field (i).type ());
 
       if (offset >= bitpos && offset < bitpos + bitsize)
        {
-         *self_p = TYPE_FIELD_TYPE (self, i);
+         *self_p = self->field (i).type ();
          cp_find_class_member (self_p, fieldno, offset - bitpos);
          return;
        }
This page took 0.038222 seconds and 4 git commands to generate.