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) +{ diff --git a/memleax.spec b/memleax.spec index d2aee0d483d944ed864f9491a9f240b34c3d00d7..e4a78892474abdc728c4dd5eb416cb538381d987 100644 --- a/memleax.spec +++ b/memleax.spec @@ -1,6 +1,6 @@ Name: memleax Version: 1.1.1 -Release: 6 +Release: 7 Summary: Memory lead detection tool License: GPLv2 URL: https://github.com/WuBingzheng/memleax @@ -48,6 +48,9 @@ make install DESTDIR="%{buildroot}" %{_mandir}/man1/%{name}.1* %changelog +* Tue Jul 18 2023 doupengda - 1.1.1-7 +- Resolve compilation errors for loongarch64 + * Wed Dec 14 2022 doupengda - 1.1.1-6 - add loongarch64 support