kernel: refactor PR_REAL_REGS

This commit is contained in:
weishu
2024-04-26 13:25:10 +08:00
parent 2e1bb8e303
commit f982683825
4 changed files with 12 additions and 30 deletions

View File

@@ -83,4 +83,10 @@
#define PT_REGS_SP(x) (__PT_REGS_CAST(x)->__PT_SP_REG)
#define PT_REGS_IP(x) (__PT_REGS_CAST(x)->__PT_IP_REG)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
#define PT_REAL_REGS(regs) ((struct pt_regs *)PT_REGS_PARM1(regs))
#else
#define PT_REAL_REGS(regs) ((regs))
#endif
#endif