diff options
author | Per Bothner <per@bothner.com> | 1995-03-29 01:11:45 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1995-03-29 01:11:45 +0000 |
commit | e55a579687331adfe9a5f46d115a903a87451284 (patch) | |
tree | bd9f540c637c14cd34031ab80f7e2e642e837942 /gdb/stabsread.c | |
parent | 7d777b91ad1899323f4e61354ef67058ff583a1e (diff) | |
download | gdb-e55a579687331adfe9a5f46d115a903a87451284.zip gdb-e55a579687331adfe9a5f46d115a903a87451284.tar.gz gdb-e55a579687331adfe9a5f46d115a903a87451284.tar.bz2 |
* gdbtypes.c (create_range_type): If indextype has TYPE_FLAG_STUB
set, set TYPE_FLAG_TARGET_STUB.
(check_stub_type): Recalculate TYPE_LENGTH for range type.
* stabsread.c (read_range_type): If index type number is followed
by '=', back up, call read_type. and assume we have a true range.
* gdbtypes.h (TYPE_FLAG_TARGET_STUB): Update comment.
This fixes PR 6632.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index e2674e6..16798b7 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -3373,12 +3373,13 @@ read_range_type (pp, typenums, objfile) int typenums[2]; struct objfile *objfile; { + char *orig_pp = *pp; int rangenums[2]; long n2, n3; int n2bits, n3bits; int self_subrange; struct type *result_type; - struct type *index_type; + struct type *index_type = NULL; /* First comes a type we are a subrange of. In C it is usually 0, 1 or the type being defined. */ @@ -3389,6 +3390,12 @@ read_range_type (pp, typenums, objfile) self_subrange = (rangenums[0] == typenums[0] && rangenums[1] == typenums[1]); + if (**pp == '=') + { + *pp = orig_pp; + index_type = read_type (pp, objfile); + } + /* A semicolon should now follow; skip it. */ if (**pp == ';') (*pp)++; @@ -3400,7 +3407,10 @@ read_range_type (pp, typenums, objfile) if (n2bits == -1 || n3bits == -1) return error_type (pp); - + + if (index_type) + goto handle_true_range; + /* If limits are huge, must be large integral type. */ if (n2bits != 0 || n3bits != 0) { @@ -3508,6 +3518,7 @@ read_range_type (pp, typenums, objfile) /* We have a real range type on our hands. Allocate space and return a real pointer. */ + handle_true_range: /* At this point I don't have the faintest idea how to deal with a self_subrange type; I'm going to assume that this is used |