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/bashreadline.py b/tools/bashreadline.py
index 984970a..2c1ff2a 100755
--- a/tools/bashreadline.py
+++ b/tools/bashreadline.py
@@ -30,11 +30,11 @@
 int printret(struct pt_regs *ctx) {
     struct str_t data  = {};
     u32 pid;
-    if (!ctx->ax)
+    if (!PT_REGS_RC(ctx))
         return 0;
     pid = bpf_get_current_pid_tgid();
     data.pid = pid;
-    bpf_probe_read(&data.str, sizeof(data.str), (void *)ctx->ax);
+    bpf_probe_read(&data.str, sizeof(data.str), (void *)PT_REGS_RC(ctx));
     events.perf_submit(ctx,&data,sizeof(data));
 
     return 0;