Support `preadv2/pwritev2`
These were added in Kernel 4.6 and they are quite similar to preadv and pwritev but adds a flags argument to tweak the behaviour.
The newest flag is RWF_APPEND which was added in 4.16.
I'm not sure exactly how these would be implemented but I noticed the application I was attempting to debug used these. So it would be nice if it was supported.
Can you share what application this is? I'm particularly interested in whether glibc or something common has picked these up.
None of the RWF_foo flags change any behavior rr cares about, so this is straightforward to implement. The preadv2 entry in src/syscalls.py needs to be changed from UnsupportedSyscall to IrregularEmulatedSyscall (to match preadv), and then the places that handle Arch::preadv throughout rr also need to handle preadv2. Similarly with pwritev2 (although this can just be an EmulatedSyscall), and then tests are needed.
https://github.com/FEX-Emu/FEX/pull/1548 FEX-Emu is using the glibc provided wrapper directly in this PR.
Specifically for the RWF_APPEND flag.
Ok.
This would be fairly straightforward if you feel like doing it, following the instructions above.