strace: Replace incorrect syscall arg2 register

Since commit e6df1c9988 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.
This commit is contained in:
Idan Horowitz 2024-03-01 21:20:55 +02:00 committed by Andreas Kling
parent 209c588ed1
commit c55b4d49a3
Notes: sideshowbarker 2024-07-17 02:35:27 +09:00

View File

@ -899,7 +899,7 @@ ErrorOr<int> 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