Gnu gdb and SunOS 4.0 (pa
Mark Moraes
moraes at csri.toronto.edu
Fri Jan 13 10:49:37 AEST 1989
The following fix appears to get gdb 2.6 (the one that came with
emacs-18.51) work correctly under SunOS4.0.
SunOS4.0 defines a struct called fpu which contains f_fpstatus, f_fparegs,
and f_pad, instead of putting c_fpstatus, c_fparegs and c_pad in the core
struct. It also defines FPU
This has been tested on Sun3/60s running SunOS4.0.
*** /tmp/,RCSt1a03427 Wed Jan 4 22:11:13 1989
--- core.c Wed Sep 28 23:47:43 1988
***************
*** 36,41
#endif
#ifdef NEW_SUN_CORE
#include <sys/core.h>
#else /* not NEW_SUN_CORE */
#ifdef UMAX_CORE
--- 36,42 -----
#endif
#ifdef NEW_SUN_CORE
+ #define FPU
#include <sys/core.h>
#else /* not NEW_SUN_CORE */
#ifdef UMAX_CORE
***************
*** 204,209
bcopy (&corestr.c_regs, registers, 16 * 4);
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = corestr.c_regs.r_ps;
*(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = corestr.c_regs.r_pc;
bcopy (corestr.c_fpstatus.fps_regs,
®isters[REGISTER_BYTE (FP0_REGNUM)],
sizeof corestr.c_fpstatus.fps_regs);
--- 205,211 -----
bcopy (&corestr.c_regs, registers, 16 * 4);
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = corestr.c_regs.r_ps;
*(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = corestr.c_regs.r_pc;
+ #ifndef FPU
bcopy (corestr.c_fpstatus.fps_regs,
®isters[REGISTER_BYTE (FP0_REGNUM)],
sizeof corestr.c_fpstatus.fps_regs);
***************
*** 210,215
bcopy (&corestr.c_fpstatus.fps_control,
®isters[REGISTER_BYTE (FPC_REGNUM)],
sizeof corestr.c_fpstatus - sizeof corestr.c_fpstatus.fps_regs);
bcopy (&corestr.c_aouthdr, &core_aouthdr, sizeof (struct exec));
--- 212,231 -----
bcopy (&corestr.c_fpstatus.fps_control,
®isters[REGISTER_BYTE (FPC_REGNUM)],
sizeof corestr.c_fpstatus - sizeof corestr.c_fpstatus.fps_regs);
+ #else
+ /*
+ * SunOS4.0 defines a struct called fpu which contains f_fpstatus,
+ * f_fparegs, and f_pad, instead of putting c_fpstatus, c_fparegs and
+ * c_pad in the core struct. It also defines FPU
+ */
+ bcopy (corestr.c_fpu.f_fpstatus.fps_regs,
+ ®isters[REGISTER_BYTE (FP0_REGNUM)],
+ sizeof corestr.c_fpu.f_fpstatus.fps_regs);
+ bcopy (&corestr.c_fpu.f_fpstatus.fps_control,
+ ®isters[REGISTER_BYTE (FPC_REGNUM)],
+ sizeof corestr.c_fpu.f_fpstatus -
+ sizeof corestr.c_fpu.f_fpstatus.fps_regs);
+ #endif
bcopy (&corestr.c_aouthdr, &core_aouthdr, sizeof (struct exec));
More information about the Comp.sys.sun
mailing list