[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest
From: |
malc |
Subject: |
Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2] |
Date: |
Wed, 17 Jun 2009 02:27:06 +0400 (MSD) |
On Tue, 16 Jun 2009, Anthony Liguori wrote:
> From: Mika Westerberg <address@hidden>
>
> - to not to break strace with GUEST_BASE is set:
> - Strace now can load and print guest strings correctly.
> - Added printing support for commonly used flags in some syscalls
> (e.g open, creat, mmap etc.)
>
> v2:
> - fix strace.c build on etch
> - add futex print to strace
>
> Signed-off-by: Mika Westerberg <address@hidden>
> Signed-off-by: Riku Voipio <address@hidden>
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index b4caffe..5ea9acb 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -6,6 +6,9 @@
> #include <sys/shm.h>
> #include <sys/select.h>
> #include <sys/types.h>
> +#include <sys/mount.h>
> +#include <sys/mman.h>
> +#include <linux/futex.h>
On my system the above line causes gcc to emit:
In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12:
/usr/include/linux/futex.h:48: error: field `__user' has incomplete type
/usr/include/linux/futex.h:48: error: syntax error before '*' token
/usr/include/linux/futex.h:63: error: field `list' has incomplete type
/usr/include/linux/futex.h:83: error: field `__user' has incomplete type
/usr/include/linux/futex.h:83: error: syntax error before '*' token
make[1]: *** [strace.o] Error 1
Following fixes it, but i wonder if there's better way:
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 5ea9acb..8c3dbd6 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1,3 +1,4 @@
+#define __user
#include <stdio.h>
#include <errno.h>
#include <sys/ipc.h>
[..snip..]
--
mailto:address@hidden
- [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], Anthony Liguori, 2009/06/16
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2],
malc <=
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], Anthony Liguori, 2009/06/16
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], Riku Voipio, 2009/06/17
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], malc, 2009/06/17
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], Anthony Liguori, 2009/06/17
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], Riku Voipio, 2009/06/17
- Re: [Qemu-commits] [COMMIT 74d753a] linux-user: strace now handles guest stringscorrectly [v2], malc, 2009/06/17