qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array


From: Fabien Chouteau
Subject: Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array
Date: Mon, 07 Oct 2013 16:40:59 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

On 10/07/2013 03:29 PM, Peter Maydell wrote:
> On 7 October 2013 22:06, Fabien Chouteau <address@hidden> wrote:
>> On 10/07/2013 01:45 PM, Peter Maydell wrote:
>>> On 7 October 2013 19:11, Fabien Chouteau <address@hidden> wrote:
>>>> On 10/04/2013 07:49 PM, Peter Maydell wrote:
>>>>> On 5 October 2013 01:57, Fabien Chouteau <address@hidden> wrote:
>>>>>> +extern const MonitorDef i386_monitor_defs[];
>>>>>
>>>>> Declare this in cpu-qom.h, rather than having an
>>>>> extern declaration in a .c file.
> 
>> Sorry I sent the email too quickly. It looks like a circular dependency
>>
>> In file included from /home/chouteau/src/qemu-main/target-arm/cpu.h:294:0,
>>                  from 
>> /home/chouteau/src/qemu-main/include/monitor/monitor_def.h:4,
>>                  from /home/chouteau/src/qemu-main/target-arm/monitor.c:20:
>> /home/chouteau/src/qemu-main/target-arm/cpu-qom.h:184:25: error: array type 
>> has incomplete element type
>> make[1]: *** [target-arm/monitor.o] Error 1
> 
> I think you should be able to declare it as
>   extern const MonitorDef *i386_monitor_defs;
> 
> then you don't need to include monitor_def.h from cpu-qom.h.
> (untested, but the typedef should be sufficient for this)
> 

/home/chouteau/src/qemu-main/target-arm/monitor.c:22:19: error: conflicting 
types for ‘arm_monitor_defs’
/home/chouteau/src/qemu-main/target-arm/cpu-qom.h:183:26: note: previous 
declaration of ‘arm_monitor_defs’ was here

cpu-qom.h is indirectly included in target-arm/monitor.c

-- 
Fabien Chouteau



reply via email to

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