aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1994-08-13 16:17:45 +0000
committerFred Fish <fnf@specifix.com>1994-08-13 16:17:45 +0000
commit96ff369d81abbd31d404d3d5e0ffd7a9d33db87b (patch)
tree9a373cc32462d093a1168b27e83140dfd56ffca1
parent71ed485dc32429fb55e15adec79180f3e595d2e3 (diff)
downloadgdb-96ff369d81abbd31d404d3d5e0ffd7a9d33db87b.zip
gdb-96ff369d81abbd31d404d3d5e0ffd7a9d33db87b.tar.gz
gdb-96ff369d81abbd31d404d3d5e0ffd7a9d33db87b.tar.bz2
Harris CX/UX support, from Bob Rusk (rrusk@mail.csd.harris.com).
* cxux-nat.c: Remove dangling #else block. ((m88k_harris_core_register_addr): New function.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/cxux-nat.c31
2 files changed, 30 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index adedc3c..c7282d3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
Sat Aug 13 08:22:50 1994 Fred Fish (fnf@cygnus.com)
+ Harris CX/UX support, from Bob Rusk (rrusk@mail.csd.harris.com).
+ * cxux-nat.c: Remove dangling #else block.
+ ((m88k_harris_core_register_addr): New function.
+
* environ.c (init_environ): If no environment, do nothing.
Fri Aug 12 15:52:37 1994 Stu Grossman (grossman@cygnus.com)
diff --git a/gdb/cxux-nat.c b/gdb/cxux-nat.c
index 52a4eb3..6216ede 100644
--- a/gdb/cxux-nat.c
+++ b/gdb/cxux-nat.c
@@ -54,11 +54,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define PSR_OFFSET (PT_PSR * sizeof(int))
#define FPSR_OFFSET (PT_FPSR * sizeof(int))
#define FPCR_OFFSET (PT_FPCR * sizeof(int))
-#else /* _CX_UX */
-/* define offsets to the pc instruction offsets in ptrace_user struct */
-#define SXIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sxip - (char *)&u)
-#define SNIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_snip - (char *)&u)
-#define SFIP_OFFSET ((char *)&u.pt_sigframe.dg_sigframe.sc_sfip - (char *)&u)
#define XREGADDR(r) (((char *)&u.pt_x0-(char *)&u) + \
((r)-X0_REGNUM)*sizeof(X_REGISTER_RAW_TYPE))
@@ -498,3 +493,29 @@ supply_fpregset (fpregsetp)
}
#endif /* _ES_MP */
+
+#ifdef _CX_UX
+
+#include <sys/regset.h>
+
+unsigned int m88k_harris_core_register_addr(int regno, int reg_ptr)
+{
+ unsigned int word_offset;
+
+ switch (regno) {
+ case PSR_REGNUM : word_offset = R_PSR; break;
+ case FPSR_REGNUM : word_offset = R_FPSR; break;
+ case FPCR_REGNUM : word_offset = R_FPCR; break;
+ case SXIP_REGNUM : word_offset = R_XIP; break;
+ case SNIP_REGNUM : word_offset = R_NIP; break;
+ case SFIP_REGNUM : word_offset = R_FIP; break;
+ default :
+ if (regno <= FP_REGNUM)
+ word_offset = regno;
+ else
+ word_offset = ((regno - X0_REGNUM) * 4) + R_X0;
+ }
+ return (word_offset * 4);
+}
+
+#endif /* _CX_UX */