* gdbtypes.h (TYPE_INDEX_TYPE): New macro.
authorPer Bothner <per@bothner.com>
Sat, 17 Sep 1994 00:38:23 +0000 (00:38 +0000)
committerPer Bothner <per@bothner.com>
Sat, 17 Sep 1994 00:38:23 +0000 (00:38 +0000)
* ch-typeprint.c, ch-valprint.c:  Use TYPE_INDEX_TYPE.
* ch-valprint.c (chill_val_print):  Pass index type directly
(instead of its TYPE_TARGET_TYPE) to print_type_scalar.
* stabsread.c (read_type):  Don't set TYPE_FLAG_TARGET_STUB
if the index type is a stub.

gdb/ChangeLog
gdb/ch-typeprint.c
gdb/ch-valprint.c
gdb/gdbtypes.h
gdb/stabsread.c

index dc9f97ee3cab90f3e6b3f322f4b14a493e684cb9..d3e3b0c5734229d9f2b9194bc145a05f146046c0 100644 (file)
@@ -1,3 +1,12 @@
+Fri Sep 16 16:06:08 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+       * gdbtypes.h (TYPE_INDEX_TYPE):  New macro.
+       * ch-typeprint.c, ch-valprint.c:  Use TYPE_INDEX_TYPE.
+       * ch-valprint.c (chill_val_print):  Pass index type directly
+       (instead of its TYPE_TARGET_TYPE) to print_type_scalar.
+       * stabsread.c (read_type):  Don't set TYPE_FLAG_TARGET_STUB
+       if the index type is a stub.
+
 Fri Sep 16 17:18:44 1994  Stan Shebs  (shebs@andros.cygnus.com)
 
        * config/i386/{i386aix.mh, i386bsd.mh, i386lynx.mh, i386sco.mh,
index 3311e1f92004f9ab3c3641d87248dda8a10dbac8..41a7d6fb4ea0a4c1fee462e90e8ea4faefaf5a0f 100644 (file)
@@ -141,7 +141,7 @@ chill_type_print_base (type, stream, show, level)
 
       case TYPE_CODE_SET:
         fputs_filtered ("POWERSET ", stream);
-       chill_print_type (TYPE_FIELD_TYPE (type, 0), "", stream,
+       chill_print_type (TYPE_INDEX_TYPE (type), "", stream,
                          show - 1, level);
        break;
 
index 00f556529e661c49ea4d4a2f583098d97f069f96..11d1a22204f46c6edf919f9b9eaab5007f98e27b 100644 (file)
@@ -294,7 +294,7 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
 
     case TYPE_CODE_BITSTRING:
     case TYPE_CODE_SET:
-      elttype = TYPE_FIELD_TYPE (type, 0);
+      elttype = TYPE_INDEX_TYPE (type);
       check_stub_type (elttype);
       if (TYPE_FLAGS (elttype) & TYPE_FLAG_STUB)
        {
@@ -323,7 +323,7 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
              {
                if (need_comma)
                  fputs_filtered (", ", stream);
-               print_type_scalar (TYPE_TARGET_TYPE (range), i, stream);
+               print_type_scalar (range, i, stream);
                need_comma = 1;
 
                /* Look for a continuous range of true elements. */
@@ -334,7 +334,7 @@ chill_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
                    while (i+1 <= high_bound
                           && value_bit_index (type, valaddr, ++i))
                      j = i;
-                   print_type_scalar (TYPE_TARGET_TYPE (range), j, stream);
+                   print_type_scalar (range, j, stream);
                  }
              }
          }
index a1fc18562e4e9fd006cc08324dcb86f7addfd48f..278a220c891f22531d3abc7130f05e65b2db9f29 100644 (file)
@@ -494,6 +494,7 @@ allocate_cplus_struct_type PARAMS ((struct type *));
 #define TYPE_NFIELDS(thistype) (thistype)->nfields
 #define TYPE_FIELDS(thistype) (thistype)->fields
 
+#define TYPE_INDEX_TYPE(type) TYPE_FIELD_TYPE (type, 0)
 #define TYPE_LOW_BOUND(range_type) TYPE_FIELD_BITPOS (range_type, 0)
 #define TYPE_HIGH_BOUND(range_type) TYPE_FIELD_BITPOS (range_type, 1)
 /* If TYPE_DUMMY_RANGE is true for a range type, it was allocated
index 49d36ac5d9721cfd9061c02461fcb47e012fb1b5..5b5fee572ddb4ef0dfe49b7dc4fb1072457e059e 100644 (file)
@@ -1719,11 +1719,6 @@ read_type (pp, objfile)
     case 'S':
       type1 = read_type (pp, objfile);
       type = create_set_type ((struct type*) NULL, type1);
-      if (TYPE_FLAGS (type1) & TYPE_FLAG_STUB)
-       {
-         TYPE_FLAGS (type) |= TYPE_FLAG_TARGET_STUB;
-         add_undefined_type (type);
-       }
       if (is_string)
        TYPE_CODE (type) = TYPE_CODE_BITSTRING;
       if (typenums[0] != -1)