From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwFzN-0007dE-PV for qemu-devel@nongnu.org; Sun, 15 Jun 2014 15:21:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwFzI-0007cV-Mp for qemu-devel@nongnu.org; Sun, 15 Jun 2014 15:21:13 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:40145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwFzI-0007cQ-Fh for qemu-devel@nongnu.org; Sun, 15 Jun 2014 15:21:08 -0400 Received: by mail-la0-f51.google.com with SMTP id mc6so2224337lab.10 for ; Sun, 15 Jun 2014 12:21:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1402846430.2347.4.camel@bruno> References: <1402246651-71099-1-git-send-email-sbruno@freebsd.org> <1402246651-71099-6-git-send-email-sbruno@freebsd.org> <1402846430.2347.4.camel@bruno> From: Peter Maydell Date: Sun, 15 Jun 2014 20:20:47 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 05/10 v4] bsd-user: Implement new syscall print_sysarch and add strace support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sean Bruno Cc: QEMU Developers On 15 June 2014 16:33, Sean Bruno 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). thanks -- PMM