| Branch: | Revision:

root / linux-user / strace.c @ 93148aa5

History | View | Annotate | Download (39 kB)

# Date Author Comment
962b289e 02/02/2012 05:51 pm Alexander Graf

linux-user: fix QEMU_STRACE=1 segfault

While debugging some issues with QEMU_STRACE I stumbled over segmentation
faults that were pretty reproducible. Turns out we tried to treat a
normal return value as errno, resulting in an access over array boundaries...

2a7e1245 02/02/2012 05:51 pm Peter Maydell

linux-user/strace.c: Correct errno printing for mmap etc

Correct the printing of errnos for syscalls which are handled
via print_syscall_ret_addr (mmap, mmap2, brk, shmat): errnos
are returned as negative returned values at this level, not
via the host 'errno' variable....

cbb21eed 10/27/2011 02:42 pm Matthias Braun

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 <>

6f11f013 05/02/2011 10:00 am Stefan Weil

linux-user: Fix compilation for "old" linux versions

Debian Lenny and other installations with older linux versions
failed to compile linux-user because some CLONE_xxx macros are

Signed-off-by: Stefan Weil <>
Signed-off-by: Riku Voipio <>

608e5592 04/26/2011 10:15 am Laurent Vivier

linux-user: improve traces

Add trace details for getpid(), kill(), _llseek(), rt_sigaction(),
rt_sigprocmask(), clone().

Signed-off-by: Laurent Vivier <>
Signed-off-by: Riku Voipio <>

4de596cb 02/17/2011 11:46 am Laurent Vivier

linux-user: add rmdir() strace

Signed-off-by: Laurent Vivier <>
Signed-off-by: Riku Voipio <>

d2ee72a5 02/17/2011 11:46 am Laurent Vivier

linux-user: in linux-user/strace.c, tswap() is useless

Syscall parameters are already swapped by the caller.

This patch removes useless tswap() from strace.c

$ QEMU_STRACE=1 chroot /m68k mknod myramdisk b 1 1
with tswap()
29944 mknod("myramdisk",026630200000) = 0...

906c1b8e 02/09/2011 10:33 am Mike Frysinger

linux-user: decode MAP_{UNINITIALIZED,EXECUTABLE} in strace

Signed-off-by: Mike Frysinger <>
Signed-off-by: Riku Voipio <>

8d9016c0 02/09/2011 10:33 am Mike Frysinger

linux-user: fix build errors for mmap2-only ports

The current print_mmap func is only enabled when the target supports the
mmap syscall, but both mmap and mmap2 syscalls use it. This leads to a
build failure when the target supports mmap2 but not mmap.

9e0b74a4 06/16/2010 03:03 pm Paul Brook

Strace mprotect flags.

Teach strace code about linux specific mprotect flags.

Signed-off-by: Paul Brook <>

5f2243f3 02/19/2010 06:04 pm Paul Brook


FUTEX_PRIVATE_FLAG is a bit orred with an existing futex op,
not a distinct value.

Signed-off-by: Paul Brook <>

03dfe9f8 06/19/2009 01:51 am Riku Voipio

linux-user: strace now handles guest stringscorrectly [v2]

On Tue, Jun 16, 2009 at 08:19:23PM -0500, Anthony Liguori wrote:

malc wrote:

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:...

74d753ac 06/16/2009 04:56 pm Mika Westerberg

linux-user: strace now handles guest strings correctly [v2]

- 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.)...

b1503cda 12/22/2008 10:33 pm malc

Use the ARRAY_SIZE() macro where appropriate.

Change from v1:
Avoid changing the existing coding style in certain files.

Signed-off-by: Stuart Brady <>

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

1d6198c3 12/13/2008 11:32 am blueswir1

Remove unnecessary trailing newlines

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

3e46b2ef 10/03/2008 10:01 pm blueswir1

Fix warning about unused function

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

98448f58 09/30/2008 09:16 pm blueswir1

Silence some warnings about uninitialized variables

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

7ccfb2eb 09/14/2008 09:45 am blueswir1

Fix warnings that would be caused by gcc flag -Wwrite-strings

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

74c11e55 05/29/2008 04:49 pm pbrook

Strace fallback for unknown syscalls.

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

6b23f777 11/14/2007 08:04 pm bellard

printf format fix

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

29fa23e7 11/11/2007 07:55 pm bellard

hex numbers must have a leading 0x

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

c16f9ed3 11/11/2007 07:23 pm bellard

use correct types

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

579a97f7 11/11/2007 04:26 pm bellard

Linux user memory access API change (initial patch by Thayne Harbaugh)

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

f3e3285d 11/03/2007 05:12 pm ths

Fix some compiler warnings.

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162

33189d31 11/01/2007 02:13 am ths

Add new files fir strace support, missed in earlier commit.

git-svn-id: svn:// c046a42c-6fe2-441c-8c8c-71466251a162