aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-03-10 18:21:02 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-03-10 18:21:02 +0000
commitf26137106836aa7d2d733f775c4f1cd9e07b6fc5 (patch)
tree987831bdd433d60861bf60f58d388e82d4b0347e /gdb/stabsread.c
parent27677e75f4c55f847f5223b360aa93c2be6ef165 (diff)
downloadgdb-f26137106836aa7d2d733f775c4f1cd9e07b6fc5.zip
gdb-f26137106836aa7d2d733f775c4f1cd9e07b6fc5.tar.gz
gdb-f26137106836aa7d2d733f775c4f1cd9e07b6fc5.tar.bz2
* stabsread.c (define_symbol): If REG_STRUCT_HAS_ADDR, also
convert a LOC_ARG to a LOC_REF_ARG. Update code which combines 'p' and 'r' symbol descriptors into a single symbol to look for a LOC_REF_ARG. * README, config/sparc/tm-sparc.h: Update comments.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4a6ccda..ec88be1 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -989,7 +989,7 @@ define_symbol (valu, string, desc, type, objfile)
{
struct symbol *prev_sym;
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
- if (SYMBOL_CLASS (prev_sym) == LOC_ARG
+ if (SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
&& STREQ (SYMBOL_NAME (prev_sym), SYMBOL_NAME(sym)))
{
SYMBOL_CLASS (prev_sym) = LOC_REGPARM;
@@ -1181,6 +1181,14 @@ define_symbol (valu, string, desc, type, objfile)
|| (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION)))
SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
+ /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th and
+ subsequent arguments on the sparc, for example). */
+ if (SYMBOL_CLASS (sym) == LOC_ARG
+ && REG_STRUCT_HAS_ADDR (processing_gcc_compilation)
+ && ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT)
+ || (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION)))
+ SYMBOL_CLASS (sym) = LOC_REF_ARG;
+
return sym;
}