aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/config/sparc/tm-sparc.h2
-rw-r--r--gdb/stabsread.c11
3 files changed, 23 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f190740..d334a79 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 5fe91a8..45ae8f9 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 ec88be1..e680f6f 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;