cc: introduce helpers to access pt_regs in an arch-independent manner
Convert some of the examples and tools to use the new helpers.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
diff --git a/tools/trace.py b/tools/trace.py
index 62d3143..9840233 100755
--- a/tools/trace.py
+++ b/tools/trace.py
@@ -202,13 +202,13 @@
self.values.append(part)
aliases = {
- "retval": "ctx->ax",
- "arg1": "ctx->di",
- "arg2": "ctx->si",
- "arg3": "ctx->dx",
- "arg4": "ctx->cx",
- "arg5": "ctx->r8",
- "arg6": "ctx->r9",
+ "retval": "PT_REGS_RC(ctx)",
+ "arg1": "PT_REGS_PARM1(ctx)",
+ "arg2": "PT_REGS_PARM2(ctx)",
+ "arg3": "PT_REGS_PARM3(ctx)",
+ "arg4": "PT_REGS_PARM4(ctx)",
+ "arg5": "PT_REGS_PARM5(ctx)",
+ "arg6": "PT_REGS_PARM6(ctx)",
"$uid": "(unsigned)(bpf_get_current_uid_gid() & 0xffffffff)",
"$gid": "(unsigned)(bpf_get_current_uid_gid() >> 32)",
"$pid": "(unsigned)(bpf_get_current_pid_tgid() & 0xffffffff)",