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

kretprobe alias for retval #225

Closed
brendangregg opened this issue Sep 17, 2015 · 5 comments
Closed

kretprobe alias for retval #225

brendangregg opened this issue Sep 17, 2015 · 5 comments

Comments

@brendangregg
Copy link
Member

On kprobe, I can declare and use the function arguments. On kretprobe, is there an alias for the return value? I'm currently using ctx->ax, which is platform dependent.

@drzaeus77
Copy link
Collaborator

That's it for now. It's a fair ask.

@brendangregg
Copy link
Member Author

x86_64 ABI references (these just confirm that %ax is correct to use): https://en.wikipedia.org/wiki/X86_calling_conventions#System_V_AMD64_ABI and http://x86-64.org/documentation/abi.pdf

@brendangregg
Copy link
Member Author

This should also work for uretprobe

@brendangregg
Copy link
Member Author

Extending on #529, perhaps we just need to add a PT_REGS_RVAL alias?

@brendangregg
Copy link
Member Author

We now have PT_REGS_RC(ctx). Closing ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants