The number of arguments specified in syscallent.h does not include
registers that are skipped to align 64-bit arguments to even/odd
register pairs. So, always retrieve all registers used for arguments.

* syscall.c (get_syscall_args): always retrieve all syscall arguments

Signed-off-by: Chris Zankel <[email protected]>
---
 syscall.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/syscall.c b/syscall.c
index 833dacd..522f446 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1935,7 +1935,7 @@ get_syscall_args(struct tcb *tcp)
 #elif defined(XTENSA)
        /* arg0: a6, arg1: a3, arg2: a4, arg3: a5, arg4: a8, arg5: a9 */
        static const int xtensaregs[MAX_ARGS] = { 6, 3, 4, 5, 8, 9 };
-       for (i = 0; i < nargs; ++i)
+       for (i = 0; i < MAX_ARGS; ++i)
                if (upeek(tcp, REG_A_BASE + xtensaregs[i], &tcp->u_arg[i]) < 0)
                        return -1;
 #else /* Other architecture (32bits specific) */
-- 
1.7.10.4


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to