diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-05-09 18:11:17 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-05-09 18:11:17 +0000 |
commit | e2cd42ddee645897df2d7ea87c5a1676576251fa (patch) | |
tree | e4a6a9b4eb2611a31835d9bcf9250a3263c77a68 | |
parent | b8d5e71d0bc6657abed6e85cf53b0efa3ec51b08 (diff) | |
download | gdb-e2cd42ddee645897df2d7ea87c5a1676576251fa.zip gdb-e2cd42ddee645897df2d7ea87c5a1676576251fa.tar.gz gdb-e2cd42ddee645897df2d7ea87c5a1676576251fa.tar.bz2 |
2002-05-06 Michael Snyder <msnyder@redhat.com>
* stabsread.c (read_type): Add recognition for new attribute:
"@V;" means that an array type is actually a vector.
This is analogous to the vector flag that's been added to dwarf2.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/stabsread.c | 20 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 79991b3..3e8f9eb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -7,6 +7,12 @@ (arm_skip_prologue): Ditto. Also make disassembly order-independent by placing it in a loop. +2002-05-06 Michael Snyder <msnyder@redhat.com> + + * stabsread.c (read_type): Add recognition for new attribute: + "@V;" means that an array type is actually a vector. + This is analogous to the vector flag that's been added to dwarf2. + 2002-05-09 Mark Kettenis <kettenis@gnu.org> * i386-tdep.h (i386_abi): New enum. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 7065b7b..32747f3 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -1904,6 +1904,7 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type, break; case 't': + /* Typedef */ SYMBOL_TYPE (sym) = read_type (&p, objfile); /* For a nameless type, we don't want a create a symbol, thus we @@ -2359,6 +2360,9 @@ read_type (register char **pp, struct objfile *objfile) /* Used to distinguish string and bitstring from char-array and set. */ int is_string = 0; + /* Used to distinguish vector from array. */ + int is_vector = 0; + /* Read type number if present. The type number may be omitted. for instance in a two-dimensional array declared with type "ar1;1;10;ar1;1;10;4". */ @@ -2574,7 +2578,7 @@ again: forward-referenced), and we must change it to a pointer, function, reference, or whatever, *in-place*. */ - case '*': + case '*': /* Pointer to another type */ type1 = read_type (pp, objfile); type = make_pointer_type (type1, dbx_lookup_type (typenums)); break; @@ -2732,16 +2736,22 @@ again: switch (*attr) { - case 's': + case 's': /* Size attribute */ type_size = atoi (attr + 1); if (type_size <= 0) type_size = -1; break; - case 'S': + case 'S': /* String attribute */ + /* FIXME: check to see if following type is array? */ is_string = 1; break; + case 'V': /* Vector attribute */ + /* FIXME: check to see if following type is array? */ + is_vector = 1; + break; + default: /* Ignore unrecognized type attributes, so future compilers can invent new ones. */ @@ -2844,9 +2854,11 @@ again: type = read_array_type (pp, type, objfile); if (is_string) TYPE_CODE (type) = TYPE_CODE_STRING; + if (is_vector) + TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; break; - case 'S': + case 'S': /* Set or bitstring type */ type1 = read_type (pp, objfile); type = create_set_type ((struct type *) NULL, type1); if (is_string) |