From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNQKA-0002XY-7K for qemu-devel@nongnu.org; Sun, 14 Oct 2012 11:41:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNQK9-0000OX-6T for qemu-devel@nongnu.org; Sun, 14 Oct 2012 11:41:54 -0400 Received: from mail-ia0-f173.google.com ([209.85.210.173]:44919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNQK9-0000OR-1i for qemu-devel@nongnu.org; Sun, 14 Oct 2012 11:41:53 -0400 Received: by mail-ia0-f173.google.com with SMTP id m10so3138894iam.4 for ; Sun, 14 Oct 2012 08:41:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1350220276-16349-1-git-send-email-peter.maydell@linaro.org> Date: Sun, 14 Oct 2012 16:41:52 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 0/7] Add LOG_GUEST_ERROR for reporting guest bugs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, patches@linaro.org On 14 October 2012 15:02, Blue Swirl wrote: > On Sun, Oct 14, 2012 at 1:11 PM, Peter Maydell wrote: >> One question that comes to mind -- should we include qemu-log.h >> in qemu-common.h (or some other common header?) rather than >> having to include qemu-log.h directly in lots of device model >> source files? > > Yes. This turns out not to be quite as trivial as I'd thought, since qemu-log.h requires (if NEED_CPU_H is defined) definitions of types like target_ulong. So we can't include it from qemu-common.h unless we change all the target-*/cpu.h to include cpu-defs.h before qemu-common.h. Alternatively we could split the NEED_CPU_H bits of qemu-log.h out into a qemu-cpu-log.h which would be manually included by the bits of qemu that needed it. The other option would be to include qemu-log.h from hw/hw.h. This just works without requiring any complicated workarounds, and all the device code includes hw.h already... -- PMM