🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #10204

Re: Gnu gdb and SunOS 4.0 (pa

#10204
From: Mark Moraes
Date: Fri, 13 Jan 1989 00:49
74 lines
3181 bytes
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 *)&registers[REGISTER_BYTE (PS_REGNUM)] = corestr.c_regs.r_ps;
  	*(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = corestr.c_regs.r_pc;
  	bcopy (corestr.c_fpstatus.fps_regs,
  	       &registers[REGISTER_BYTE (FP0_REGNUM)],
  	       sizeof corestr.c_fpstatus.fps_regs);

--- 205,211 -----
  	bcopy (&corestr.c_regs, registers, 16 * 4);
  	*(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = corestr.c_regs.r_ps;
  	*(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = corestr.c_regs.r_pc;
+ #ifndef FPU
  	bcopy (corestr.c_fpstatus.fps_regs,
  	       &registers[REGISTER_BYTE (FP0_REGNUM)],
  	       sizeof corestr.c_fpstatus.fps_regs);
***************
*** 210,215
  	bcopy (&corestr.c_fpstatus.fps_control,
  	       &registers[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,
  	       &registers[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,
+ 	       &registers[REGISTER_BYTE (FP0_REGNUM)],
+ 	       sizeof corestr.c_fpu.f_fpstatus.fps_regs);
+ 	bcopy (&corestr.c_fpu.f_fpstatus.fps_control,
+ 	       &registers[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));
Technical Details
Message-ID: <89Jan4.221519est.488@church.csri.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!xanth!nic.MR.NET!csd4.milw.wisc.edu!leah!itsgw!rpi!sun.soe.clarkson.edu!batcomputer!cornell!uw-beaver!rice!sun-spots-request
References: <8812220523.AA07133@uunet.UU.NET

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!xanth!nic.MR.NET!csd4.milw.wisc.edu!leah!itsgw!rpi!sun.soe.clarkson.edu!batcomputer!cornell!uw-beaver!rice!sun-spots-request
From: moraes@csri.toronto.edu (Mark Moraes)
Newsgroups: comp.sys.sun
Subject: Re: Gnu gdb and SunOS 4.0 (pa
Message-ID: <89Jan4.221519est.488@church.csri.toronto.edu>
Date: 13 Jan 89 00:49:37 GMT
References: <8812220523.AA07133@uunet.UU.NET
Sender: usenet@rice.edu
Organization: Sun-Spots
Lines: 74
Approved: Sun-Spots@rice.edu
Original-Date: Wed, 4 Jan 89 22:15:13 EST
X-Sun-Spots-Digest: Volume 7, Issue 98, message 9 of 13