diff --git a/0001-add-loongarch64-support.patch b/0001-add-loongarch64-support.patch index f5fdb7829f8a1ff7ef67d1b0471edb506bcb6bc1..980de1bb340a2796483914145ea5152a020e79dd 100644 --- a/0001-add-loongarch64-support.patch +++ b/0001-add-loongarch64-support.patch @@ -40,23 +40,23 @@ index cbbe69d..4472bd1 100644 +#elif defined(MLX_LOONGARCH64) +static inline uintptr_t call_return_address(pid_t pid, registers_info_t *regs) +{ -+ return ptrace_get_data(pid, regs->gpr[3]); ++ return ptrace_get_data(pid, regs->regs[3]); +} +static inline uintptr_t call_return_value(registers_info_t *regs) +{ -+ return regs->gpr[1]; ++ return regs->regs[1]; +} +static inline uintptr_t call_arg1(pid_t pid, registers_info_t *regs) +{ -+ return regs->gpr[6]; ++ return regs->regs[6]; +} +static inline uintptr_t call_arg2(pid_t pid, registers_info_t *regs) +{ -+ return regs->gpr[7]; ++ return regs->regs[7]; +} +static inline uintptr_t pc_unwind(pid_t pid, registers_info_t *regs) +{ -+ return regs->pc; ++ return regs->csr_era; +} +static inline void set_breakpoint(pid_t pid, uintptr_t address, uintptr_t code) +{