summary refs log tree commit diff stats
path: root/linux-user/qemu.h
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2024-09-12 11:28:21 +0200
committerRichard Henderson <richard.henderson@linaro.org>2024-10-13 10:05:51 -0700
commit3674bfadb503e535250730be5df563f0d9928917 (patch)
treefe82a3e5695df19f733288cffebb9a347de1c1d8 /linux-user/qemu.h
parentf781af3b14fc87c5177d8d8e209d89743e4857df (diff)
downloadfocaccia-qemu-3674bfadb503e535250730be5df563f0d9928917.tar.gz
focaccia-qemu-3674bfadb503e535250730be5df563f0d9928917.zip
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>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r--linux-user/qemu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 98ad848ab2..895bdd722a 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -114,6 +114,10 @@ struct TaskState {
     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
     abi_ulong tp_value;