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