From cbb21eed186647716b9e8404a9e90d3fc5c6c467 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 12 Aug 2011 19:57:41 +0200 Subject: linux-user: fix abi_(u)long, target_ulong mismatch abi_(u)long might be different from target_ulong, so don't use tswapl but introduce a new tswapal Signed-off-by: Matthias Braun Signed-off-by: Riku Voipio --- linux-user/strace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux-user/strace.c') diff --git a/linux-user/strace.c b/linux-user/strace.c index fe9326aa73..90027a1106 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -169,7 +169,7 @@ print_fdset(int n, abi_ulong target_fds_addr) return; for (i=n; i>=0; i--) { - if ((tswapl(target_fds[i / TARGET_ABI_BITS]) >> (i & (TARGET_ABI_BITS - 1))) & 1) + if ((tswapal(target_fds[i / TARGET_ABI_BITS]) >> (i & (TARGET_ABI_BITS - 1))) & 1) gemu_log("%d,", i ); } unlock_user(target_fds, target_fds_addr, 0); @@ -245,7 +245,7 @@ print_execve(const struct syscallname *name, arg_ptr = lock_user(VERIFY_READ, arg_ptr_addr, sizeof(abi_ulong), 1); if (!arg_ptr) return; - arg_addr = tswapl(*arg_ptr); + arg_addr = tswapal(*arg_ptr); unlock_user(arg_ptr, arg_ptr_addr, 0); if (!arg_addr) break; -- cgit v1.2.3-55-g7522