mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
* stabsread.c (read_type): Save a reference to types that are defined
as cross references to other types.
This commit is contained in:
parent
d97d0546d3
commit
149d821b1e
@ -1,3 +1,8 @@
|
||||
2003-12-04 J. Brobecker <brobecker@gnat.com>
|
||||
|
||||
* stabsread.c (read_type): Save a reference to types that are defined
|
||||
as cross references to other types.
|
||||
|
||||
2003-12-02 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* thread-db.c (enable_thread_event): Change return type to
|
||||
|
@ -1564,11 +1564,9 @@ read_type (char **pp, struct objfile *objfile)
|
||||
*pp = from + 1;
|
||||
}
|
||||
|
||||
/* Now check to see whether the type has already been
|
||||
declared. This was written for arrays of cross-referenced
|
||||
types before we had TYPE_CODE_TARGET_STUBBED, so I'm pretty
|
||||
sure it is not necessary anymore. But it might be a good
|
||||
idea, to save a little memory. */
|
||||
/* If this type has already been declared, then reuse the same
|
||||
type, rather than allocating a new one. This saves some
|
||||
memory. */
|
||||
|
||||
for (ppt = file_symbols; ppt; ppt = ppt->next)
|
||||
for (i = 0; i < ppt->nsyms; i++)
|
||||
@ -1582,6 +1580,8 @@ read_type (char **pp, struct objfile *objfile)
|
||||
{
|
||||
obstack_free (&objfile->type_obstack, type_name);
|
||||
type = SYMBOL_TYPE (sym);
|
||||
if (typenums[0] != -1)
|
||||
*dbx_lookup_type (typenums) = type;
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user