🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #61

ptrace and the 68881

#61
From: Ray Moody
Date: Fri, 07 Jul 1989 21:18
48 lines
1749 bytes
Index:	sys/sys_process.c 4.3BSD + ISI4.0D

Version:
	    This bug is in Integrated Solutions Incorporated
	implementation of ptrace.  It does not appear in standard 4.3 BSD.

Description:
	    Ptrace does not allow writes to u.U_FLOAT.  If you use
	dbx, this makes no difference whatsoever (because dbx can't handle
	register floats anyway), but it is important if you use gcc and gdb.

Repeat-By:
	    Run gdb and try to set a register variable (even a register
	variable declared as an integer).  You will see:

	       writing register number 18: I/O error.

Fix:
	RCS file: RCS/sys_process.c,v
	retrieving revision 1.1
	retrieving revision 1.1.1.1
	diff -c -r1.1 -r1.1.1.1
	*** /tmp/,RCSt1026463	Fri Jul  7 16:15:21 1989
	--- /tmp/,RCSt2026463	Fri Jul  7 16:15:22 1989
	***************
	*** 195,202
	  			ipc.ip_data &=  ~PSL_USERCLR;
	  			goto ok;
	  		}
	! 		goto error;
	! 
	  	ok:
	  		*p = ipc.ip_data;
	  		break;
	
	--- 195,206 -----
	  			ipc.ip_data &=  ~PSL_USERCLR;
	  			goto ok;
	  		}
	! 		/* RAY: Allow writes into u.U_FLOAT */
	! 		if ((unsigned) p < (unsigned) &u.U_FLOAT)
	! 			goto error;
	! 		if ((unsigned) p >
	! 		    (unsigned) &u.U_FLOAT + sizeof(u.U_FLOAT) - sizeof(*p))
	! 			goto error;
	  	ok:
	  		*p = ipc.ip_data;
	  		break;
Technical Details
Message-ID: <2352@pur-phy>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!ray

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!ray
From: ray@gibbs.physics.purdue.edu (Ray Moody)
Newsgroups: gnu.gdb.bug,comp.bugs.4bsd
Subject: ptrace and the 68881
Keywords: is68k
Message-ID: <2352@pur-phy>
Date: 7 Jul 89 21:18:11 GMT
Sender: news@pur-phy
Reply-To: ray@gibbs.physics.purdue.edu (Ray Moody)
Organization: Purdue Univ. Physics Dept., W. Lafayette, IN
Lines: 48