diff options
author | Per Bothner <per@bothner.com> | 1996-01-12 01:31:37 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1996-01-12 01:31:37 +0000 |
commit | 1c486a2ba52c43b220e6654b6bc89dae72129540 (patch) | |
tree | 242515cf3ba4d4158b569d99286cef942ce1b618 /gdb/stabsread.c | |
parent | 71897943c416613a8186d7063b38f0725256cb37 (diff) | |
download | gdb-1c486a2ba52c43b220e6654b6bc89dae72129540.zip gdb-1c486a2ba52c43b220e6654b6bc89dae72129540.tar.gz gdb-1c486a2ba52c43b220e6654b6bc89dae72129540.tar.bz2 |
* stabsread.c (define-symbol): Use invisible references
for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
* eval.c (evaluate_subexp_standard): When known, use the formal
parameter type as the expected type when evaluating arg expressions.
* ch-lang.c (evaluate_subexp_chill): Likewise (for MULTI_SUBSCRIPT).
This (with a fix to gcc/config/sparc/sparc.h) fixes PR chill/8742.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r-- | gdb/stabsread.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c index ee22e65..c81b21e 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -1000,7 +1000,9 @@ define_symbol (valu, string, desc, type, objfile) && REG_STRUCT_HAS_ADDR (processing_gcc_compilation, SYMBOL_TYPE (sym)) && (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT - || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION) + || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION + || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_SET + || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_BITSTRING) #endif ) { @@ -1223,26 +1225,24 @@ define_symbol (valu, string, desc, type, objfile) } /* When passing structures to a function, some systems sometimes pass - the address in a register, not the structure itself. + the address in a register, not the structure itself. */ - If REG_STRUCT_HAS_ADDR yields non-zero we have to convert LOC_REGPARM - to LOC_REGPARM_ADDR for structures and unions. */ - - if (SYMBOL_CLASS (sym) == LOC_REGPARM - && REG_STRUCT_HAS_ADDR (processing_gcc_compilation, + if (REG_STRUCT_HAS_ADDR (processing_gcc_compilation, SYMBOL_TYPE (sym)) && ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT) - || (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, - SYMBOL_TYPE (sym)) - && ((TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT) - || (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION))) - SYMBOL_CLASS (sym) = LOC_REF_ARG; + || (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION) + || (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_BITSTRING) + || (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_SET))) + { + /* If REG_STRUCT_HAS_ADDR yields non-zero we have to + convert LOC_REGPARM to LOC_REGPARM_ADDR for structures and unions. */ + if (SYMBOL_CLASS (sym) == LOC_REGPARM) + 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). */ + else if (SYMBOL_CLASS (sym) == LOC_ARG) + SYMBOL_CLASS (sym) = LOC_REF_ARG; + } return sym; } |