[comp.archives] [pc532] Ptrace

Jyrki Kuoppala <jkp@sauna.hut.fi> (02/27/91)

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.]