gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / m2-valprint.c
index e210b5ec2f1821bebbb65efc668aa4a2c398f614..f9cb626fd6872ba348d77344e51dabb8f3b72fd3 100644 (file)
@@ -49,9 +49,9 @@ get_long_set_bounds (struct type *type, LONGEST *low, LONGEST *high)
 {
   int len, i;
 
-  if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
+  if (type->code () == TYPE_CODE_STRUCT)
     {
-      len = TYPE_NFIELDS (type);
+      len = type->num_fields ();
       i = TYPE_N_BASECLASSES (type);
       if (len == 0)
        return 0;
@@ -83,7 +83,7 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr,
   type = check_typedef (type);
 
   fprintf_filtered (stream, "{");
-  len = TYPE_NFIELDS (type);
+  len = type->num_fields ();
   if (get_long_set_bounds (type, &low_bound, &high_bound))
     {
       field = TYPE_N_BASECLASSES (type);
@@ -191,7 +191,7 @@ print_unpacked_pointer (struct type *type,
   struct type *elttype = check_typedef (TYPE_TARGET_TYPE (type));
   int want_space = 0;
 
-  if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
+  if (elttype->code () == TYPE_CODE_FUNC)
     {
       /* Try to print what function it points to.  */
       print_function_pointer_address (options, gdbarch, addr, stream);
@@ -209,7 +209,7 @@ print_unpacked_pointer (struct type *type,
      pointed to, unless pointer is null.  */
 
   if (TYPE_LENGTH (elttype) == 1
-      && TYPE_CODE (elttype) == TYPE_CODE_INT
+      && elttype->code () == TYPE_CODE_INT
       && (options->format == 0 || options->format == 's')
       && addr != 0)
     {
@@ -237,7 +237,7 @@ print_variable_at_address (struct type *type,
   fputs_filtered (paddress (gdbarch, addr), stream);
   fprintf_filtered (stream, "] : ");
   
-  if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
+  if (elttype->code () != TYPE_CODE_UNDEF)
     {
       struct value *deref_val =
        value_at (TYPE_TARGET_TYPE (type), unpack_pointer (type, valaddr));
@@ -267,9 +267,9 @@ m2_print_array_contents (struct value *val,
     {
       /* For an array of chars, print with string syntax.  */
       if (TYPE_LENGTH (type) == 1 &&
-         ((TYPE_CODE (type) == TYPE_CODE_INT)
+         ((type->code () == TYPE_CODE_INT)
           || ((current_language->la_language == language_m2)
-              && (TYPE_CODE (type) == TYPE_CODE_CHAR)))
+              && (type->code () == TYPE_CODE_CHAR)))
          && (options->format == 0 || options->format == 's'))
        val_print_string (type, NULL, value_address (val), len+1, stream,
                          options);
@@ -309,7 +309,7 @@ m2_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
   const CORE_ADDR address = value_address (val);
 
   struct type *type = check_typedef (value_type (val));
-  switch (TYPE_CODE (type))
+  switch (type->code ())
     {
     case TYPE_CODE_ARRAY:
       if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
@@ -318,9 +318,9 @@ m2_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
          len = TYPE_LENGTH (type) / TYPE_LENGTH (elttype);
          /* For an array of chars, print with string syntax.  */
          if (TYPE_LENGTH (elttype) == 1 &&
-             ((TYPE_CODE (elttype) == TYPE_CODE_INT)
+             ((elttype->code () == TYPE_CODE_INT)
               || ((current_language->la_language == language_m2)
-                  && (TYPE_CODE (elttype) == TYPE_CODE_CHAR)))
+                  && (elttype->code () == TYPE_CODE_CHAR)))
              && (options->format == 0 || options->format == 's'))
            {
              /* If requested, look for the first null char and only print
This page took 0.026006 seconds and 4 git commands to generate.