linux-user: add strace for getuid(), gettid(), getppid(), geteuid()

Improve strace support for syscalls getuid(), gettid(), getppid()
and geteuid(). Since these system calls don't have arguments, "%s()"
is added in the corresponding strace.list entry so that no arguments
are printed.

getuid:
Prior to this commit, typical strace output used to look like this:
4894 getuid(4894,0,0,274886293296,-3689348814741910323,4832615904) = 1000
After this commit, it looks like this:
4894 getuid() = 1000

gettid:
Prior to this commit, typical strace output used to look like this:
8307 gettid(0,0,64,0,4832630528,4832615840) = 8307
After this commit, it looks like this:
8307 gettid() = 8307

getppid:
Prior to this commit, typical strace output used to look like this:
20588 getppid(20588,64,0,4832630528,4832615888,0) = 20625
After this commit, it looks like this:
20588 getppid() = 20625

geteuid:
Prior to this commit, typical strace output used to look like this:
20588 geteuid(64,0,0,4832615888,0,-9151031864016699136) = 1000
After this commit, it looks like this:
20588 geteuid() = 1000

Signed-off-by: Miloš Stojanović <Milos.Stojanovic@rt-rk.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
Miloš Stojanović 2017-05-15 16:59:41 +02:00 committed by Riku Voipio
parent 58de8b9684
commit 65424cc456

View file

@ -290,7 +290,7 @@
{ TARGET_NR_getegid32, "getegid32" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_geteuid
{ TARGET_NR_geteuid, "geteuid" , NULL, NULL, NULL },
{ TARGET_NR_geteuid, "geteuid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_geteuid32
{ TARGET_NR_geteuid32, "geteuid32" , NULL, NULL, NULL },
@ -338,7 +338,7 @@
{ TARGET_NR_getpmsg, "getpmsg" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getppid
{ TARGET_NR_getppid, "getppid" , NULL, NULL, NULL },
{ TARGET_NR_getppid, "getppid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getpriority
{ TARGET_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL },
@ -381,13 +381,13 @@
NULL, NULL },
#endif
#ifdef TARGET_NR_gettid
{ TARGET_NR_gettid, "gettid" , NULL, NULL, NULL },
{ TARGET_NR_gettid, "gettid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_gettimeofday
{ TARGET_NR_gettimeofday, "gettimeofday" , NULL, NULL, NULL },
#endif
#ifdef TARGET_NR_getuid
{ TARGET_NR_getuid, "getuid" , NULL, NULL, NULL },
{ TARGET_NR_getuid, "getuid" , "%s()", NULL, NULL },
#endif
#ifdef TARGET_NR_getuid32
{ TARGET_NR_getuid32, "getuid32" , NULL, NULL, NULL },