linux-user/i386: Emulate orig_ax

The kernel uses orig_rax/orig_eax to store the syscall number before
a syscall. One can see this value in core dumps and ptrace.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20240912093012.402366-3-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Ilya Leoshkevich 2024-09-12 11:28:21 +02:00 committed by Richard Henderson
parent f781af3b14
commit 3674bfadb5
3 changed files with 9 additions and 2 deletions

View file

@ -113,6 +113,10 @@ struct TaskState {
struct target_vm86plus_struct vm86plus;
uint32_t v86flags;
uint32_t v86mask;
#endif
#if defined(TARGET_I386)
/* Last syscall number. */
target_ulong orig_ax;
#endif
abi_ulong child_tidptr;
#ifdef TARGET_M68K