aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-10-23 01:56:18 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-10-23 01:56:18 +0000
commitdcb389736b3a54eadeaff8d80e5cdd42f2ec2141 (patch)
tree3fd6814a150bc9a09e88e29c20aa554922e64d54
parentc3cabecb471111ee81d8a57a9affa63f594a74dc (diff)
downloadgdb-dcb389736b3a54eadeaff8d80e5cdd42f2ec2141.zip
gdb-dcb389736b3a54eadeaff8d80e5cdd42f2ec2141.tar.gz
gdb-dcb389736b3a54eadeaff8d80e5cdd42f2ec2141.tar.bz2
* stabsread.c (define_symbol): Skip the whole thing about "pcc
promotion" on little-endian machines.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/stabsread.c12
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bbc57da..94cc9a2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
Fri Oct 22 07:49:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * stabsread.c (define_symbol): Skip the whole thing about "pcc
+ promotion" on little-endian machines.
+
* remote-vx.c: Rename pid parameter to pid_to_wait_for. Some
compilers (legitimately) don't like variables in the function's
outermost block whose name is the name as a parameter.
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index bee0cd3..f2d671c 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -812,6 +812,11 @@ define_symbol (valu, string, desc, type, objfile)
#endif
add_symbol_to_list (sym, &local_symbols);
+#if TARGET_BYTE_ORDER == LITTLE_ENDIAN
+ /* On little-endian machines, this crud is never necessary, and,
+ if the extra bytes contain garbage, is harmful. */
+ break;
+#else /* Big endian. */
/* If it's gcc-compiled, if it says `short', believe it. */
if (processing_gcc_compilation || BELIEVE_PCC_PROMOTION)
break;
@@ -838,9 +843,7 @@ define_symbol (valu, string, desc, type, objfile)
/* This macro is defined on machines (e.g. sparc) where
we should believe the type of a PCC 'short' argument,
but shouldn't believe the address (the address is
- the address of the corresponding int). Note that
- this is only different from the BELIEVE_PCC_PROMOTION
- case on big-endian machines.
+ the address of the corresponding int).
My guess is that this correction, as opposed to changing
the parameter to an 'int' (as done below, for PCC
@@ -850,7 +853,7 @@ define_symbol (valu, string, desc, type, objfile)
the sparc problem doesn't come up because the calling
function has to zero the top bytes (not knowing whether
the called function wants an int or a short), so there
- is no practical difference between an int and a short
+ is little practical difference between an int and a short
(except perhaps what happens when the GDB user types
"print short_arg = 0x10000;").
@@ -892,6 +895,7 @@ define_symbol (valu, string, desc, type, objfile)
#endif /* no BELIEVE_PCC_PROMOTION_TYPE. */
}
#endif /* !BELIEVE_PCC_PROMOTION. */
+#endif /* Big endian. */
case 'P':
/* acc seems to use P to delare the prototypes of functions that