From: Jeff Law Date: Wed, 23 Mar 1994 04:14:34 +0000 (+0000) Subject: * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84ad95c118631eba3101d575ceaefcc9d02d438b;p=binutils-gdb.git * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument for the structure's type. All callers changed. * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR for each structure argument rather than assuming it's either true or false for all structure arguments. * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only on the length structure passed, not the compiler used. * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional argument for the structure's type. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f19074039f7..d334a79c36c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,18 @@ +Tue Mar 22 20:12:53 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument + for the structure's type. All callers changed. + + * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR + for each structure argument rather than assuming it's either + true or false for all structure arguments. + + * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only + on the length structure passed, not the compiler used. + + * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional + argument for the structure's type. + Tue Mar 22 15:28:33 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * values.c (set_internalvar): Don't set var->value until we are diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 5fe91a8627f..45ae8f9b266 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -30,7 +30,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 1.92) behaves like sun cc. REG_STRUCT_HAS_ADDR is smart enough to distinguish between Sun cc, gcc version 1 and gcc version 2. */ -#define REG_STRUCT_HAS_ADDR(gcc_p) (gcc_p != 1) +#define REG_STRUCT_HAS_ADDR(gcc_p,type) (gcc_p != 1) /* Sun /bin/cc gets this right as of SunOS 4.1.x. We need to define BELIEVE_PCC_PROMOTION to get this right now that the code which diff --git a/gdb/stabsread.c b/gdb/stabsread.c index ec88be17103..e680f6ff1b0 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -485,7 +485,7 @@ read_type_number (pp, typenums) static char *type_synonym_name; #if !defined (REG_STRUCT_HAS_ADDR) -#define REG_STRUCT_HAS_ADDR(gcc_p) 0 +#define REG_STRUCT_HAS_ADDR(gcc_p,type) 0 #endif /* ARGSUSED */ @@ -983,7 +983,8 @@ define_symbol (valu, string, desc, type, objfile) if (local_symbols && local_symbols->nsyms > 0 - && REG_STRUCT_HAS_ADDR (processing_gcc_compilation) + && 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)) { @@ -1176,7 +1177,8 @@ define_symbol (valu, string, desc, type, objfile) to LOC_REGPARM_ADDR for structures and unions. */ if (SYMBOL_CLASS (sym) == LOC_REGPARM - && REG_STRUCT_HAS_ADDR (processing_gcc_compilation) + && 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; @@ -1184,7 +1186,8 @@ define_symbol (valu, string, desc, type, objfile) /* 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) + && 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;