aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-12-29 18:42:52 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-12-29 18:42:52 +0000
commit4bfe9e81cd785d38a89c5396b268c19f911c2283 (patch)
tree11da0ee06e61f6a38e542ab128807d4e2a02177e /gdb
parent6c06a518bf28ee875ed4ef97985ca964adfc90f9 (diff)
downloadgdb-4bfe9e81cd785d38a89c5396b268c19f911c2283.zip
gdb-4bfe9e81cd785d38a89c5396b268c19f911c2283.tar.gz
gdb-4bfe9e81cd785d38a89c5396b268c19f911c2283.tar.bz2
* stabsread.c (define_symbol): If we choose not to combine
two symbols, don't just ignore the second (LOC_REGISTER) one. * printcmd.c (print_frame_args): If we have a LOC_ARG and a LOC_REGISTER, use the LOC_ARG not the LOC_REGISTER.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/stabsread.c17
2 files changed, 15 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6d714b2..54cb0d1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+Wed Dec 29 12:32:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+
+ * stabsread.c (define_symbol): If we choose not to combine
+ two symbols, don't just ignore the second (LOC_REGISTER) one.
+ * printcmd.c (print_frame_args): If we have a LOC_ARG and a
+ LOC_REGISTER, use the LOC_ARG not the LOC_REGISTER.
+
Tue Dec 28 15:08:00 1993 Fred Fish (fnf@deneb.cygnus.com)
* solib.c (DEBUG_BASE): Remove macro and all references.
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 4cd13f9..75d53a9 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -929,10 +929,7 @@ define_symbol (valu, string, desc, type, objfile)
SYMBOL_VALUE (sym) = SP_REGNUM; /* Known safe, though useless */
}
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
- if (within_function
- && REG_STRUCT_HAS_ADDR (processing_gcc_compilation)
- && (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT
- || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION))
+ if (within_function)
{
/* Sun cc uses a pair of symbols, one 'p' and one 'r' with the same
name to represent an argument passed in a register.
@@ -941,17 +938,19 @@ define_symbol (valu, string, desc, type, objfile)
But we only do this in the REG_STRUCT_HAS_ADDR case, so that
we can still get information about what is going on with the
- stack (VAX for computing args_printed, possible future changes
- to use stack slots instead of saved registers in backtraces,
- etc.).
-
+ stack (VAX for computing args_printed, using stack slots instead
+ of saved registers in backtraces, etc.).
+
Note that this code illegally combines
main(argc) struct foo argc; { register struct foo argc; }
but this case is considered pathological and causes a warning
from a decent compiler. */
if (local_symbols
- && local_symbols->nsyms > 0)
+ && local_symbols->nsyms > 0
+ && REG_STRUCT_HAS_ADDR (processing_gcc_compilation)
+ && (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT
+ || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION))
{
struct symbol *prev_sym;
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];