Add /proc/version for procfs with -o linux. The version reported depends
on the emulation type of the calling process:
$ cat /proc/version
NetBSD version 5.99.55 (netbsd@localhost) (gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) NetBSD 5.99.55 (GENERIC) #39: Sun Sep 4 09:10:05 EDT 2011
$ /emul/linux/bin/cat /proc/version
Linux version 2.6.18 (linux@localhost) (gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) #0 Wed Mar 3 03:03:03 PST 2010
$ /emul/linux32/bin/cat /proc/version
Linux version 2.6.18 (linux32@localhost) (gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120)) #0 Wed Mar 3 03:03:03 PST 2010
debugger (l->l_sigpendset == NULL), using siggetinfo() try to fetch the
siginfo information from l->l_sigpend and then from p->p_sigpend if it
was not found. This allows us to pass siginfo information for traps from
the debugger.
When saving the signal in p->p_xstat, clear it from the pending mask, but
don't remove it from the siginfo queue, so that next time the debugger
delivers it, the original information is found.
When posting a signal from the debugger l->l_sigpendset is not set, so we
use the process pending signal and add it back to the process pending set.
- Need to add options CPU_HOST=i386 or CPU_HOST=amd64 for membar & atomic_ops
- Don't use MAP_* and PROT_* with thunk API since the kernel and host
might not be the same; add THUNK_MAP_* and THUNK_PROT_* and translate them
- Add thunk_posix_memalign
- allocate mem_uvm with thunk_posix_memalign instead of thunk_malloc
- Fix thunk_mmap callers to always pass either THUNK_MAP_PRIVATE or
THUNK_MAP_SHARED
- mkstemp on Linux requires exactly 6 "X" characters at the end of the
template string, so add an X
ranges that include the least and the greatest vmem_addr_t. Update
vmem(9) uses throughout the kernel. Slightly expand on the tests in
subr_vmem.c, which still pass. I've been running a kernel with this
patch without any trouble.
- add a field in struct proc to save the forker/forkee pid, and a flag.
- add 3 new ptrace calls: PT_GET_PROCESS_STATE, PT_GET_EVENT_MASK,
PT_SET_EVENT_MASK
Add a PT_STRINGS constant so that we don't hard-code the list of ptrace
subcalls in other programs (kdump).
1. When we vfork() PL_PPWAIT is set, and that makes us do regular disposition
of the TRAP signal, and not indirect through the debugger.
2. The parent needs to keep running, so that the debugger can release it.
Unfortunately, with vfork() we cannot release the parent because it will
eventually core-dump since the parent and the child cannot run on the
same address space.
stop it right now.
XXX[1]: Cannot make this MI, because I cannot wrap child_return because there
is MD code that checks fun == child_return. I think it is better to have an
mi child_return() and add a cpu_child_return()?
XXX[2]: Why do we need to stop so early? Perhaps stopping just after exec
is better?