summaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 7d04cc7c637..a4143e84b9a 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1118,7 +1118,9 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (local_symbols
&& local_symbols->nsyms > 0
-#ifndef USE_REGISTER_NOT_ARG
+#ifndef DEPRECATED_USE_REGISTER_NOT_ARG
+ /* DEPRECATED_USE_REGISTER_NOT_ARG is only defined by
+ the SPARC. */
&& gdbarch_stabs_argument_has_addr (current_gdbarch,
SYMBOL_TYPE (sym))
#endif
@@ -1562,11 +1564,9 @@ again:
*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++)
@@ -1580,6 +1580,8 @@ again:
{
obstack_free (&objfile->type_obstack, type_name);
type = SYMBOL_TYPE (sym);
+ if (typenums[0] != -1)
+ *dbx_lookup_type (typenums) = type;
return type;
}
}