diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2022-02-09 03:17:40 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii.nakryiko@gmail.com> | 2022-02-09 09:48:32 -0800 |
commit | 497ec1d35ca3bb824f9345e32b665157077b1746 (patch) | |
tree | 45530f84a1703ab7d5a57a4e923b217a73a66cd6 | |
parent | 8a28842a20788208ca60cebad2f48754df5d30ee (diff) | |
download | libbpf-497ec1d35ca3bb824f9345e32b665157077b1746.tar.gz |
libbpf: Fix riscv register names
riscv registers are accessed via struct user_regs_struct, not struct
pt_regs. The program counter member in this struct is called pc, not
epc. The frame pointer is called s0, not fp.
Fixes: 3cc31d794097 ("libbpf: Normalize PT_REGS_xxx() macro definitions")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220209021745.2215452-6-iii@linux.ibm.com
-rw-r--r-- | src/bpf_tracing.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bpf_tracing.h b/src/bpf_tracing.h index 20bc637..03e501a 100644 --- a/src/bpf_tracing.h +++ b/src/bpf_tracing.h @@ -210,10 +210,10 @@ #define __PT_PARM4_REG a3 #define __PT_PARM5_REG a4 #define __PT_RET_REG ra -#define __PT_FP_REG fp +#define __PT_FP_REG s0 #define __PT_RC_REG a5 #define __PT_SP_REG sp -#define __PT_IP_REG epc +#define __PT_IP_REG pc #endif |