kretprobe alias for retval #225

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

Projects

None yet

2 participants

Contributor

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.

Collaborator

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

Contributor

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

Contributor

This should also work for uretprobe

Contributor

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

Contributor

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