trace.c: fix (partially) umovelong
umovelong was always returning the full value read in ptrace'd process
memory (eg long) even if the type was not a long (eg int).
This patch add handling for at least int case.
[ found out with parameters test case on x86_64 as int is 32bit and long
64bit ]
Signed-off-by: Arnaud Patard <apatard@mandriva.com>
diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c
index df5b090..6ce0c80 100644
--- a/sysdeps/linux-gnu/trace.c
+++ b/sysdeps/linux-gnu/trace.c
@@ -55,6 +55,14 @@
return -errno;
*result = pointed_to;
+ if (info) {
+ switch(info->type) {
+ case ARGTYPE_INT:
+ *result &= 0x00000000ffffffffUL;
+ default:
+ break;
+ };
+ }
return 0;
}
#endif