Improve decoding of Android's PR_SET_VMA prctl
Before:
prctl(0x53564d41 /* PR_??? */, 0, 0x7f8ab53000, 4096,
"atexit handlers") = 0
After:
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x7fa8cbd000, 4096,
"atexit handlers") = 0
* prctl.c (SYS_FUNC(prctl)) [__ANDROID__]: Do not define PR_SET_VMA.
* Hard-code PR_SET_VMA_ANON_NAME, the only current sub-option.
* xlat/prctl_options.in: Add PR_SET_VMA.
diff --git a/prctl.c b/prctl.c
index 53ee56e..da7d265 100644
--- a/prctl.c
+++ b/prctl.c
@@ -208,16 +208,12 @@
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(", PR_SET_VMA_ANON_NAME, %#lx", tcp->u_arg[2]);
tprintf(", %lu, ", tcp->u_arg[3]);
printstr(tcp, tcp->u_arg[4], -1);
} else {