gdb: Preserve is-stmt lines when switch between files
[deliverable/binutils-gdb.git] / gdb / d-valprint.c
index 109049cd1dea7ca5f00bd0e5b7e147e43ae51ca4..34f8b05a62b438d108b4f3b8d8b35d1fe3cd6d84 100644 (file)
@@ -34,8 +34,8 @@ dynamic_array_type (struct type *type,
                    struct value *val,
                    const struct value_print_options *options)
 {
-  if (TYPE_NFIELDS (type) == 2
-      && TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_INT
+  if (type->num_fields () == 2
+      && TYPE_FIELD_TYPE (type, 0)->code () == TYPE_CODE_INT
       && strcmp (TYPE_FIELD_NAME (type, 0), "length") == 0
       && strcmp (TYPE_FIELD_NAME (type, 1), "ptr") == 0
       && !value_bits_any_optimized_out (val,
@@ -78,7 +78,7 @@ d_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
   int ret;
 
   struct type *type = check_typedef (value_type (val));
-  switch (TYPE_CODE (type))
+  switch (type->code ())
     {
       case TYPE_CODE_STRUCT:
        ret = dynamic_array_type (type, value_embedded_offset (val),
This page took 0.025639 seconds and 4 git commands to generate.