[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/5] linux-user: update get_thread_area/set_thre
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 5/5] linux-user: update get_thread_area/set_thread_area strace |
Date: |
Fri, 10 Jun 2016 14:04:55 +0100 |
On 8 June 2016 at 21:24, Laurent Vivier <address@hidden> wrote:
> int get_thread_area(struct user_desc *u_info);
> int set_thread_area(struct user_desc *u_info);
>
> Signed-off-by: Laurent Vivier <address@hidden>
> ---
> linux-user/strace.list | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index 7c54dc6..9c0259c 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -337,7 +337,7 @@
> { TARGET_NR_getsockopt, "getsockopt" , NULL, NULL, NULL },
> #endif
> #ifdef TARGET_NR_get_thread_area
> -{ TARGET_NR_get_thread_area, "get_thread_area" , NULL, NULL, NULL },
> +{ TARGET_NR_get_thread_area, "get_thread_area", "%s(%p)", NULL, NULL },
> #endif
> #ifdef TARGET_NR_gettid
> { TARGET_NR_gettid, "gettid" , NULL, NULL, NULL },
> @@ -1234,7 +1234,7 @@
> { TARGET_NR_setsockopt, "setsockopt" , NULL, NULL, NULL },
> #endif
> #ifdef TARGET_NR_set_thread_area
> -{ TARGET_NR_set_thread_area, "set_thread_area" , NULL, NULL, NULL },
> +{ TARGET_NR_set_thread_area, "set_thread_area", "%s(%p)", NULL, NULL },
> #endif
> #ifdef TARGET_NR_set_tid_address
> { TARGET_NR_set_tid_address, "set_tid_address" , NULL, NULL, NULL },
The problem with this is that %p is a format string for a host pointer,
but the argument we pass to gemu_log() in print_syscall() is an abi_long.
If host pointers are 64 bit but abi_long is 32 bit this is going to do
the wrong thing.
This is a bug present in some of our current format strings, but
we should probably not add to it. I think TARGET_ABI_FMT_lx should
do what you want?
thanks
-- PMM
- [Qemu-devel] [PATCH 0/5] linux-user: some strace improvements, Laurent Vivier, 2016/06/08
- [Qemu-devel] [PATCH 3/5] linux-user: add socket() strace, Laurent Vivier, 2016/06/08
- [Qemu-devel] [PATCH 4/5] linux-user: fix clone() strace, Laurent Vivier, 2016/06/08
- [Qemu-devel] [PATCH 2/5] linux-user: correct setsockopt() strace., Laurent Vivier, 2016/06/08
- [Qemu-devel] [PATCH 1/5] linux-user: add socketcall() strace, Laurent Vivier, 2016/06/08
- [Qemu-devel] [PATCH 5/5] linux-user: update get_thread_area/set_thread_area strace, Laurent Vivier, 2016/06/08
- Re: [Qemu-devel] [PATCH 5/5] linux-user: update get_thread_area/set_thread_area strace,
Peter Maydell <=