On 9/15/21 9:43 AM, Warner Losh wrote:
Split out two functions into linux-user/host/arch/host-signal.h.
Since linux-user requires a linux host, drop all of the BSD and
Solaris ifdefs. These should be recreated under bsd-user/ when
the current blanks there are filled.
For some architectures, this code will be small and host specific (I'm thinking
arm, i386, ppc* and x86_64) but for others, there's common code that can be
shared
to parse the instruction (aarch64, mips*, riscv*). Do you see any value in
sharing that instruction parsing code in some way?
Yes, that would be ideal. Although even more ideal would be for all kernels to actually
provide detail to the signal handler so that we don't need to parse instructions.
(AArch64 being the example where they did finally fix that, though we've still got for for
pre-3.16 kernels still hanging about.) How are the BSDs in this respect?
Anyway, I'm not sure how to organize such sharing, but I'm open to suggestion.
r~