On Sun, Oct 14, 2012 at 3:41 PM, Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 14 October 2012 15:02, Blue Swirl <blauwir...@gmail.com> wrote:
>> On Sun, Oct 14, 2012 at 1:11 PM, Peter Maydell <peter.mayd...@linaro.org> 
>> 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...

I was also thinking about that but then I thought that it would be
nice to use qemu-log.h elsewhere too. But hw/hw.h sounds much easier
for now.

>
> -- PMM

Reply via email to