diff options
author | Per Bothner <per@bothner.com> | 1994-09-16 07:29:44 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1994-09-16 07:29:44 +0000 |
commit | 576f97700b15b15f404fee452f862b1949cb30de (patch) | |
tree | f91841baf3db20cedf82b619fdc68f9583693450 /gdb/stabsread.c | |
parent | bdef6b60f3f6c9e44b2a5c66a95466e82be9a21e (diff) | |
download | gdb-576f97700b15b15f404fee452f862b1949cb30de.zip gdb-576f97700b15b15f404fee452f862b1949cb30de.tar.gz gdb-576f97700b15b15f404fee452f862b1949cb30de.tar.bz2 |
* stabsread.c (read_type): Handle stub types for bitstrings.
* stabsread.c (read_array_type): Check for stub domain type
using TYPE_FLAG_STUB, not its length.
* gdbtypes.c (create_set_type): Handle a stub domain type.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index fa5c31f..49d36ac 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -1719,6 +1719,11 @@ 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) @@ -2989,12 +2994,8 @@ read_array_type (pp, type, objfile) /* If we have an array whose element type is not yet known, but whose bounds *are* known, record it to be adjusted at the end of the file. */ - /* FIXME: Why check for zero length rather than TYPE_FLAG_STUB? I think - the two have the same effect except that the latter is cleaner and the - former would be wrong for types which really are zero-length (if we - have any). */ - if (TYPE_LENGTH (element_type) == 0 && !adjustable) + if ((TYPE_FLAGS (element_type) & TYPE_FLAG_STUB) && !adjustable) { TYPE_FLAGS (type) |= TYPE_FLAG_TARGET_STUB; add_undefined_type (type); |