[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/10 v4] bsd-user: Implement new syscall print_

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 05/10 v4] bsd-user: Implement new syscall print_sysarch and add strace support
Date: Sun, 15 Jun 2014 20:20:47 +0100

On 15 June 2014 16:33, Sean Bruno <address@hidden> wrote:
> I think there's some confusion between the strace support for the new
> print_sysarch() and the existing syscall do_freebsd_sysarch().

Only because you've put parts of both in the same patch :-)

> If I follow the code, the existing do_freebsd_sysarch() syscall is a
> programtical way of figuring out what arch is running.  Whereas
> print_sysarch() spams the arch into your strace output.

The existing do_freebsd_sysarch() is a bunch of functions in
syscall.c, with TARGET_* ifdefs selecting which one you get.
This patch seems to be attempting to change that to having
the per-arch implementations in the per-arch files. That's a
good idea, but this patch is only doing half of the job -- you
need to remove the old implementations and wire up the new.
Really the changes to the implementation and to the strace
support should go in separate patches.

> Bearing that in mind, I think that the changes here are indeed correct
> for this patchset.

I still disagree here. Look at the TARGET_I386 implementation
of do_freebsd_sysarch() in the existing syscall.c, and at the
new function do_freebsd_arch_sysarch() you've added in this patch in
bsd-user/x86_64/target_arch_sysarch.h. They're basically
identical -- this should be a code-move change, but you've
only got the 'add new version', not the 'and remove the old'.

I think if you remove all the do_freebsd_arch_sysarch()
functions from this patch you're left with just the strace
support (the strace related functions all have 'print' in
their names).

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]