gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / m2-typeprint.c
index 1f1300c8f23da0017e4b661378bd2325e828755e..d2596b256d239390d14c1b9c3de50eede1b93a60 100644 (file)
@@ -163,8 +163,8 @@ m2_print_typedef (struct type *type, struct symbol *new_symbol,
 {
   type = check_typedef (type);
   fprintf_filtered (stream, "TYPE ");
-  if (!TYPE_NAME (SYMBOL_TYPE (new_symbol))
-      || strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))),
+  if (!SYMBOL_TYPE (new_symbol)->name ()
+      || strcmp ((SYMBOL_TYPE (new_symbol))->name (),
                 new_symbol->linkage_name ()) != 0)
     fprintf_filtered (stream, "%s = ", new_symbol->print_name ());
   else
@@ -178,8 +178,8 @@ m2_print_typedef (struct type *type, struct symbol *new_symbol,
 void
 m2_type_name (struct type *type, struct ui_file *stream)
 {
-  if (TYPE_NAME (type) != NULL)
-    fputs_filtered (TYPE_NAME (type), stream);
+  if (type->name () != NULL)
+    fputs_filtered (type->name (), stream);
 }
 
 /* m2_range - displays a Modula-2 subrange type.  */
@@ -211,9 +211,9 @@ static void
 m2_typedef (struct type *type, struct ui_file *stream, int show,
            int level, const struct type_print_options *flags)
 {
-  if (TYPE_NAME (type) != NULL)
+  if (type->name () != NULL)
     {
-      fputs_filtered (TYPE_NAME (type), stream);
+      fputs_filtered (type->name (), stream);
       fputs_filtered (" = ", stream);
     }
   m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level, flags);
@@ -284,7 +284,7 @@ m2_procedure (struct type *type, struct ui_file *stream,
   if (TYPE_TARGET_TYPE (type) == NULL
       || TYPE_TARGET_TYPE (type)->code () != TYPE_CODE_VOID)
     {
-      int i, len = TYPE_NFIELDS (type);
+      int i, len = type->num_fields ();
 
       fprintf_filtered (stream, " (");
       for (i = 0; i < len; i++)
@@ -311,7 +311,7 @@ m2_print_bounds (struct type *type,
 {
   struct type *target = TYPE_TARGET_TYPE (type);
 
-  if (TYPE_NFIELDS(type) == 0)
+  if (type->num_fields () == 0)
     return;
 
   if (print_high)
@@ -346,7 +346,7 @@ m2_is_long_set (struct type *type)
 
       /* check if all fields of the RECORD are consecutive sets.  */
 
-      len = TYPE_NFIELDS (type);
+      len = type->num_fields ();
       for (i = TYPE_N_BASECLASSES (type); i < len; i++)
        {
          if (TYPE_FIELD_TYPE (type, i) == NULL)
@@ -409,7 +409,7 @@ m2_is_long_set_of_type (struct type *type, struct type **of_type)
 
   if (type->code () == TYPE_CODE_STRUCT)
     {
-      len = TYPE_NFIELDS (type);
+      len = type->num_fields ();
       i = TYPE_N_BASECLASSES (type);
       if (len == 0)
        return 0;
@@ -434,15 +434,15 @@ m2_long_set (struct type *type, struct ui_file *stream, int show, int level,
 {
   struct type *of_type;
   int i;
-  int len = TYPE_NFIELDS (type);
+  int len = type->num_fields ();
   LONGEST low;
   LONGEST high;
 
   if (m2_is_long_set (type))
     {
-      if (TYPE_NAME (type) != NULL)
+      if (type->name () != NULL)
        {
-         fputs_filtered (TYPE_NAME (type), stream);
+         fputs_filtered (type->name (), stream);
          if (show == 0)
            return 1;
          fputs_filtered (" = ", stream);
@@ -490,7 +490,7 @@ m2_is_unbounded_array (struct type *type)
        *  type of _m2_contents is a pointer.  The TYPE_TARGET_TYPE
        *  of the pointer determines the unbounded ARRAY OF type.
        */
-      if (TYPE_NFIELDS (type) != 2)
+      if (type->num_fields () != 2)
        return 0;
       if (strcmp (TYPE_FIELD_NAME (type, 0), "_m2_contents") != 0)
        return 0;
@@ -530,11 +530,11 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show,
                  int level, const struct type_print_options *flags)
 {
   /* Print the tag if it exists.  */
-  if (TYPE_NAME (type) != NULL)
+  if (type->name () != NULL)
     {
-      if (!startswith (TYPE_NAME (type), "$$"))
+      if (!startswith (type->name (), "$$"))
        {
-         fputs_filtered (TYPE_NAME (type), stream);
+         fputs_filtered (type->name (), stream);
          if (show > 0)
            fprintf_filtered (stream, " = ");
        }
@@ -550,7 +550,7 @@ m2_record_fields (struct type *type, struct ui_file *stream, int show,
   else if (show > 0)
     {
       int i;
-      int len = TYPE_NFIELDS (type);
+      int len = type->num_fields ();
 
       if (type->code () == TYPE_CODE_STRUCT)
        fprintf_filtered (stream, "RECORD\n");
@@ -595,13 +595,13 @@ m2_enum (struct type *type, struct ui_file *stream, int show, int level)
   if (show < 0)
     {
       /* If we just printed a tag name, no need to print anything else.  */
-      if (TYPE_NAME (type) == NULL)
+      if (type->name () == NULL)
        fprintf_filtered (stream, "(...)");
     }
-  else if (show > 0 || TYPE_NAME (type) == NULL)
+  else if (show > 0 || type->name () == NULL)
     {
       fprintf_filtered (stream, "(");
-      len = TYPE_NFIELDS (type);
+      len = type->num_fields ();
       lastval = 0;
       for (i = 0; i < len; i++)
        {
This page took 0.026884 seconds and 4 git commands to generate.