From c55b4d49a3a9c4cee3269dc11bdbe7cccc4db118 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Fri, 1 Mar 2024 21:20:55 +0200 Subject: [PATCH] strace: Replace incorrect syscall arg2 register Since commit e6df1c998804cca1848c634411b42d277d9ff265 which switched us over to using the syscall/sysret instruction the second syscall argument changed from rcx to rdi. Update strace as well to print the actually correct values for the second arg. --- Userland/Utilities/strace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/strace.cpp b/Userland/Utilities/strace.cpp index 017dd94998..eea59bf112 100644 --- a/Userland/Utilities/strace.cpp +++ b/Userland/Utilities/strace.cpp @@ -899,7 +899,7 @@ ErrorOr serenity_main(Main::Arguments arguments) #if ARCH(X86_64) syscall_arg_t syscall_index = regs.rax; syscall_arg_t arg1 = regs.rdx; - syscall_arg_t arg2 = regs.rcx; + syscall_arg_t arg2 = regs.rdi; syscall_arg_t arg3 = regs.rbx; #elif ARCH(AARCH64) syscall_arg_t syscall_index = 0; // FIXME