to be the first entry, effectively resetting context of all processes to
default emulation on every EMUL trace record
rewrite ectx_find() to fix this, using <sys/queue.h> LIST for readability
this fix should once and for all remove need to ever use -e option,
and makes kdump work properly for traces with processes under different
emulations
EMUL_FLAG_NETBSD32. set EMUL_FLAG_NETBSD32 in any 32 bit on 64 bit
kernel emulation layers.
- if EMUL_FLAG_NETBSD32 is set, calculate the proper argument count.
(XXX: this should use register32_t, but that's not visible to all
builders of kdump...)
now netbsd32_ioctl(2) actually reports sane values, and other arguments
are mostly correctly printed (there are still some signed extension
issues with 32 bit numbers being displayed as "0xffffffff8xxxxxxx".)
- Check names of system calls (for special treatment) because emulations
might use different numbers.
- Report an error if arguments to -p or -m non-numeric.
- Just take last of -x and -Xvalue, stop -X0x80000000 being valid (core dumps).
- Keep 'last used' emulation_ctx at top of list, create on lookup (usually
EMUL anyway), delete when exit called (doesn't return).
- Slightly improve hack to get correct system call name in execve return
when emulation has changed.
- Rename global variables 'current'/'previous' to 'cur_emul'/'prev_emul'.
(TODO: save system call type (and maybe an argument) per pid so GIO trace
format can depend on the actual system call.)
Fixes part of PR sparc64/23473 - but system call arguments will still not be
displayed correctly.
and PSIG.
XXX[1]: This shows that signal emulation ktrace is slightly busted: posted
signals should really be translated to the emulated ones instead of
producing ktrace records with the signal numbers of the native
emulation.
XXX[2]: There are other places where signal names can be displayed, but this
is not done yet.