From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTAWD-0001Z7-HU for qemu-devel@nongnu.org; Mon, 07 Oct 2013 09:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTAW8-0000Yx-S7 for qemu-devel@nongnu.org; Mon, 07 Oct 2013 09:06:37 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:59068 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTAW8-0000Yj-Lw for qemu-devel@nongnu.org; Mon, 07 Oct 2013 09:06:32 -0400 Message-ID: <5252B1D6.9050109@adacore.com> Date: Mon, 07 Oct 2013 15:06:30 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1380905823-3981-1-git-send-email-chouteau@adacore.com> <1380905823-3981-4-git-send-email-chouteau@adacore.com> <525288C9.3080207@adacore.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Luiz Capitulino , QEMU Developers , =?UTF-8?B?QW5kcmVhcyBGw6RyYmU=?= =?UTF-8?B?cg==?= On 10/07/2013 01:45 PM, Peter Maydell wrote: > On 7 October 2013 19:11, Fabien Chouteau wrote: >> On 10/04/2013 07:49 PM, Peter Maydell wrote: >>> On 5 October 2013 01:57, Fabien Chouteau wrote: >>>>> @@ -47,7 +48,9 @@ >>>> #include "hw/xen/xen.h" >>>> #include "hw/i386/apic_internal.h" >>>> #endif >>>> +#include "monitor/monitor_def.h" >>>> >>>> +extern const MonitorDef i386_monitor_defs[]; >>> >>> Declare this in cpu-qom.h, rather than having an >>> extern declaration in a .c file. >>> >> >> I didn't manage to do that. > > If you just say "I couldn't make that work" with no details, > there isn't much I can say beyond "try harder" :-) > If you say *why* you couldn't get it to work then I'm more > likely to either (a) suggest an approach that will work or > (b) accept that it really does have to be that way... > 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 monitor_def.h -> cpu.h -> cpu-qom.h -. ^ | |__________________________________/ -- Fabien Chouteau