Quote:> [ trace not working in gdb ]
>My personal version handles this correctly (as well as doing some other
>things in a cleaner manner), but I'm not quite ready for a new release
>yet. I could make YAAR (yet another alpha-release) or just mail
>interested parties the fixes needed - mail me if you're interested, and
>depending on the number of messages I get I'll make it a new release.
Ok, the response seems to make a new pre-release appropriate: I have
uploaded "pre-0.96.tar.Z" to tsx-11 and nic.
Here is what the pre-release contains:
- truncate/ftruncate/fchmod/fchown system calls
note that there aren't any library functions for these, so they
aren't very useful yet...
[f]truncate needed a change in the logic of the internal
truncate VFS call - anybody that has any nonstandard filesystem
probably needs to look it up.
- io-bitmap syscalls giving root-processes access to selected io ports
from user space. There is a "ioperm()" system call that lets the
process select which ports it wants to enable/disable (all ports
disabled as default) as well as a (standard sysv?) ioctl interface
that X uses.
again, no library stubs, but it allows things like reading and
setting the cmos clock without using /dev/port, as well as
control over the VGA registers...
- mmap for /dev/mem
more things needed for X...
- the signal-handling fixes needed for gdb
These aren't yet complete: serial lines still send signals under
interrupts that can result in problems (ie ptrace doesn't
correctly get them), but that's pretty unlikely (and will be
fixed in the final 0.96). Breakpoints should work etc..
- multiple shared libraries
Up to 6 simultaneous shared libraries/process: the patches were
originally by pmacdona, but they were heavily changed by me, and
I think they work in a more natural manner now. One user-level
change is that the libraries are now checked for read and
execute permissions for safety-reasons.
- cleaned up special files.
read/write/ioctl no longer has special-case code: it is all
handled with tables to functions. This will mean that the SCSI
patches won't patch in quite cleanly into 0.96: you'll need to
add the code that sets up the functions.
Again: device drivers and vfs-filesystem hackers need to look
into the changes, although they are pretty logical (earlier
versions just didn't implement all the vfs-routines)
Note that the vfs-code for select is still not used: select is
hardcoded for the devices it supports right now.
- ptrace() has a new interface
as gdb for versions < 0.95c don't work on the new version, and
gdb won't work very well at all on 0.95c[+], there was no reason
not to break ptrace. Thus 0.96 has a new calling convention for
ptrace, and the old ptrace library function no longer works.
I'm including the new ptrace library function at the end of this
post.
- mount() takes 4 arguments, and checks that only the super-user can
mount/umount things.
Happily this shouldn't break any old binaries.
- some general cleanups
I've made the pre-release available only as pure source code: no diffs,
no binary. The reason is that most people that needed this release want
it for the gdb-fixes: and they should have no problem recompiling the
kernel. Others just have to wait for the real 0.96.
Changes that are NOT in this pre-release, but which I hope to have in
the real 0.96:
- more include-file cleanups - I'm still working on these
- the wd8003 driver and hopefully some other parts of biro's
config.
- select() using the vfs-tables.
And possibly bugfixes that people find in this pre-release...
Linus
---------- library ptrace.c (wants gcc-2.1) ----------
#define __LIBRARY__
#include <time.h>
#include <unistd.h>
int ptrace(int request, int pid, int addr, int data)
{
long ret;
long res;
if (request > 0 && request < 4)
(long *)data = &ret;
__asm__ volatile ("int $0x80"
:"=a" (res)
:"0" (__NR_ptrace),"b" (request), "c" (pid),
"d" (addr), "S" (data)
: "si","bx","cx","dx");
if (res >= 0) {
if (request > 0 && request < 4) {
errno = 0;
return (ret);
}
return (int) res;
}
errno = -res;
return -1;
Quote:}