1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

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

View file

@ -899,7 +899,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
#if ARCH(X86_64) #if ARCH(X86_64)
syscall_arg_t syscall_index = regs.rax; syscall_arg_t syscall_index = regs.rax;
syscall_arg_t arg1 = regs.rdx; syscall_arg_t arg1 = regs.rdx;
syscall_arg_t arg2 = regs.rcx; syscall_arg_t arg2 = regs.rdi;
syscall_arg_t arg3 = regs.rbx; syscall_arg_t arg3 = regs.rbx;
#elif ARCH(AARCH64) #elif ARCH(AARCH64)
syscall_arg_t syscall_index = 0; // FIXME syscall_arg_t syscall_index = 0; // FIXME