aboutsummaryrefslogtreecommitdiff
path: root/gdb/config
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-01-22 08:42:14 +0000
committerStu Grossman <grossman@cygnus>1994-01-22 08:42:14 +0000
commit8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618 (patch)
tree5d10d81cb709c41c0ccf505098dfecf6d1e8bb95 /gdb/config
parenteae821453c15f5990eecdaae1f16642baa0c11fb (diff)
downloadgdb-8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618.zip
gdb-8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618.tar.gz
gdb-8bf94f44bc8109f7aa3a4272ba6b4ba36d5fb618.tar.bz2
* sparc-tdep.c, lynx-nat.c, config/sparc/tm-sparc.h,
config/sparc/tm-sparclynx.h: Move defs of FRAME_SAVED_I0/L0 to tm-sparc.h so they can be overridden if necessary.
Diffstat (limited to 'gdb/config')
-rw-r--r--gdb/config/sparc/tm-sparc.h12
-rw-r--r--gdb/config/sparc/tm-sparclynx.h8
2 files changed, 18 insertions, 2 deletions
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index b71f7f2..69899b8 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -346,10 +346,18 @@ CORE_ADDR sparc_frame_chain ();
#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \
(FRAMELESS) = frameless_look_for_prologue(FI)
+/* The location of I0 w.r.t SP. This is actually dependent on how the system's
+ window overflow/underflow routines are written. Most vendors save the L regs
+ followed by the I regs (at the higher address). Some vendors get it wrong.
+ */
+
+#define FRAME_SAVED_L0 0
+#define FRAME_SAVED_I0 (8 * REGISTER_RAW_SIZE (L0_REGNUM))
+
/* Where is the PC for a specific frame */
-#define FRAME_SAVED_PC(FRAME) frame_saved_pc (FRAME)
-CORE_ADDR frame_saved_pc ();
+#define FRAME_SAVED_PC(FRAME) sparc_frame_saved_pc (FRAME)
+CORE_ADDR sparc_frame_saved_pc ();
/* If the argument is on the stack, it will be here. */
#define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
diff --git a/gdb/config/sparc/tm-sparclynx.h b/gdb/config/sparc/tm-sparclynx.h
index 525eeb4..8a0ea72 100644
--- a/gdb/config/sparc/tm-sparclynx.h
+++ b/gdb/config/sparc/tm-sparclynx.h
@@ -25,4 +25,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Use generic Sparc definitions. */
#include "sparc/tm-sparc.h"
+/* Lynx does this backwards from everybody else */
+
+#undef FRAME_SAVED_I0
+#undef FRAME_SAVED_L0
+
+#define FRAME_SAVED_I0 0
+#define FRAME_SAVED_L0 (8 * REGISTER_RAW_SIZE (I0_REGNUM))
+
#endif /* TM_SPARCLYNX_H */