Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove registers that are not in struct pt_regs (x86-64) #1383

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

mmisono
Copy link
Collaborator

@mmisono mmisono commented Jun 13, 2020

cf. x86-64 struct pt_regs.

Fix the following errors.

% ./src/bpftrace -e 'k:f {  printf("%d\n", reg("fs_base")); }'
Attaching 1 probe...
Error loading program: kprobe:f (try -v)
% sudo ./src/bpftrace -e 'i:s:1 {  printf("%d, %d\n", reg("fs_base"), ctx->sample_period); }'
Attaching 1 probe...
1000000000, 1000000000
^C
Checklist
  • Language changes are updated in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md

Copy link
Member

@danobi danobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but fix merge conflict please

cf. [x86-64 struct pt_regs](https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/ptrace.h).

Fixes the following errors.

```
% ./src/bpftrace -e 'k:f {  printf("%d\n", reg("fs_base")); }'
Attaching 1 probe...
Error loading program: kprobe:f (try -v)
```

```
% sudo ./src/bpftrace -e 'i:s:1 {  printf("%d, %d\n", reg("fs_base"), ctx->sample_period); }'
Attaching 1 probe...
1000000000, 1000000000
^C
```
@mmisono mmisono requested a review from danobi June 19, 2020 00:20
@danobi danobi merged commit f2a6bde into bpftrace:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants