[PATCH] arm64: use sregs for syscall probe registers
Frank Ch. Eigler
fche@redhat.com
Tue Apr 16 15:33:00 GMT 2019
Frank van der Linden <fllinden@amazon.com> writes:
> Since syscall wrappers are now active on arm64 (4.19+), arguments need to
> be retrieved the right way, by checking if there is a saved set of system
> call registers, and using them if there are. [...]
This looks good to me.
> + if (STAP_ARG_argnum < 1 || STAP_ARG_argnum > 8) {
> + snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer),
> + "Cannot access arg(%lld)",
> + (long long)STAP_ARG_argnum);
> + CONTEXT->last_error = CONTEXT->error_buffer;
> + return;
> + }
By the way, as listed in [man stap], there are some helper macros to
make this a little more compact:
if (...) {
STAP_ERROR("foo bar %lld", (long long)foo);
}
- FChE
More information about the Systemtap
mailing list