We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using gccgo, Go function arguments can be read using arg0...argN, as it follows the standard AMD64 ABI. Eg:
# bpftrace -e 'uprobe:/home/bgregg/func:main.add { printf("%d %d\n", arg0, arg1); }' Attaching 1 probe... 42 13
But using Go gc, it follows the Plan9 stack convention where everything is placed on the stack. The same arguments can be read instead using:
# bpftrace -e 'uprobe:/home/bgregg/Lang/go/func:main*add { printf("%d %d\n", *(reg("sp") + 8), *(reg("sp") + 16)); }' Attaching 1 probe... 42 13
This ticket is to suggest adding these aliases:
goarg0
*(reg("sp") + 8)
goarg1
*(reg("sp") + 16)
Maybe better: call them sarg0, sarg1, ...: short for "stack argument", since Golang may not be the only runtime/compiler doing this.
sarg0
sarg1
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
using gccgo, Go function arguments can be read using arg0...argN, as it follows the standard AMD64 ABI. Eg:
But using Go gc, it follows the Plan9 stack convention where everything is placed on the stack. The same arguments can be read instead using:
This ticket is to suggest adding these aliases:
goarg0
==*(reg("sp") + 8)
goarg1
==*(reg("sp") + 16)
Maybe better: call them
sarg0
,sarg1
, ...: short for "stack argument", since Golang may not be the only runtime/compiler doing this.The text was updated successfully, but these errors were encountered: