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.
This commit is contained in:
Michael Snyder 2002-05-09 18:11:17 +00:00
parent b8d5e71d0b
commit e2cd42ddee
2 changed files with 22 additions and 4 deletions

View File

@ -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.

View File

@ -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)