Skip to content

Commit

Permalink
tools: Use architecture-agnostic PT_REGS_RC
Browse files Browse the repository at this point in the history
  • Loading branch information
pchaigno committed May 5, 2018
1 parent dad0ad1 commit f1e9abe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/old/bashreadline.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
return 0;
char str[80] = {};
bpf_probe_read(&str, sizeof(str), (void *)ctx->ax);
bpf_probe_read(&str, sizeof(str), (void *)PT_REGS_RC(ctx));
bpf_trace_printk("%s\\n", &str);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion tools/old/tcpaccept.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
int kretprobe__inet_csk_accept(struct pt_regs *ctx)
{
struct sock *newsk = (struct sock *)ctx->ax;
struct sock *newsk = (struct sock *)PT_REGS_RC(ctx);
u32 pid = bpf_get_current_pid_tgid();
if (newsk == NULL)
Expand Down
2 changes: 1 addition & 1 deletion tools/old/tcpconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
static int trace_connect_return(struct pt_regs *ctx, short ipver)
{
int ret = ctx->ax;
int ret = PT_REGS_RC(ctx);
u32 pid = bpf_get_current_pid_tgid();
struct sock **skpp;
Expand Down

0 comments on commit f1e9abe

Please sign in to comment.