Newsgroups: comp.archives
Path: utzoo!utgpu!news-server.csri.toronto.edu!ox.com!emv
From: Jyrki Kuoppala <jkp@sauna.hut.fi>
Subject: [pc532] Ptrace(2) for the pc532, now gdb works
Message-ID: <1991Feb27.052840.26320@ox.com>
Followup-To: comp.sys.nsc.32k
Sender: emv@ox.com (Edward Vielmetti)
Reply-To: Jyrki Kuoppala <jkp@sauna.hut.fi>
Organization: Helsinki University of Technology, Finland.
References: <9102260631.AA28947@cs.hut.fi>
Date: Wed, 27 Feb 1991 05:28:40 GMT
Approved: emv@ox.com (Edward Vielmetti)
X-Original-Newsgroups: comp.sys.nsc.32k

Archive-name: sys/pc532/minix-ptrace/1991-02-26
Archive: ftp.funet.fi:pub/misc/pc532/kdiffs-1.5 [128.214.6.100]
Original-posting-by: Jyrki Kuoppala <jkp@sauna.hut.fi>
Original-subject: Ptrace(2) for the pc532, now gdb works
Reposted-by: emv@ox.com (Edward Vielmetti)

Forget my question about trace.  Here it is.

Bad news for you kernel hackers - no more going back to the ROM
debugger if you install this - I had to use the bpt insn for
debugging.  Well, all is under #ifdef DO_PTRACE so if you please ..

No known bugs with ptrace(2), one with gdb: when you call a function
from gdb, for example `print sleep(5)' it executes the function
properly but on return fails to restore the stack (and perhaps
something else) to the proper conditions.

Now single-stepping, breakpointing, changing variables & code, etc.
work with gdb.  Not thoroughly test, but I presume you've all been in
a need for a good debugger so you'll start using it right away and I
get lots of bug reports.

Printing floating point numbers doesn't work in the diff in
nic.funet.fi, I forgot to define the macro for invalid float.

Here's the diff to 1.5.10 / 1.3 hybrid kernel (only the kernel dir, mm
and fs already handled tracing properly), available also from
ftp.funet.fi:pub/misc/pc532/kdiffs-1.5:

//Jyrki

[300 lines of patch deleted.  --Ed.]
