Android-specific prctl
Dmitry V. Levin
ldv at altlinux.org
Wed Jul 29 16:13:56 UTC 2015
On Tue, Jul 28, 2015 at 02:28:00PM -0700, enh wrote:
[...]
> diff --git a/prctl.c b/prctl.c
> index 4c12bac..f5f655c 100644
> --- a/prctl.c
> +++ b/prctl.c
> @@ -168,6 +168,27 @@ SYS_FUNC(prctl)
> printstr(tcp, tcp->u_arg[1], TASK_COMM_LEN);
> return RVAL_DECODED;
>
> +#ifdef __ANDROID__
> +# ifndef PR_SET_VMA
> +# define PR_SET_VMA 0x53564d41
> +# endif
> +# ifndef PR_SET_VMA_ANON_NAME
> +# define PR_SET_VMA_ANON_NAME 0
> +# endif
> + case PR_SET_VMA:
> + if (tcp->u_arg[1] == PR_SET_VMA_ANON_NAME) {
> + tprintf(", %lu", tcp->u_arg[1]);
> + tprintf(", %#lx", tcp->u_arg[2]);
> + tprintf(", %lu, ", tcp->u_arg[3]);
> + printstr(tcp, tcp->u_arg[4], -1);
> + } else {
> + // There are no other sub-options now, but there
> + // might be in future...
> + print_prctl_args(tcp, 1);
> + }
> + break;
> +#endif
> +
> case PR_SET_MM:
> tprints(", ");
> printxval(pr_set_mm, tcp->u_arg[1], "PR_SET_MM_???");
Let's keep current practice of using /* */ for comments.
Besides that, fine with me.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150729/bb13b877/attachment.bin>
More information about the Strace-devel
mailing list