[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from m
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c |
Date: |
Fri, 28 Aug 2015 11:12:08 +0100 |
On 28 August 2015 at 10:21, Pavel Butsykin <address@hidden> wrote:
> Yes, this is a good way if we make the interface: const MonitorDef
> *target_monitor_defs(void);
> But we can't include the 'monitor/monitor-common.h' to
> stubs/target-monitor-defs.c, because
> there is a dependency with a target-specific headers( such as
> cpu.h:CPUArchState, cpu-defs.h:target_long).
> Make a copy of the struct MonitorDef not a good way because we can miss the
> change of copied MonitorDef
> in stubs/target-monitor-defs.c and this will result in an bug. Can this be
> solved somehow else?
That target_long is awkward. I suggest making the stub version
just return NULL rather than a pointer to an empty list (you'll
need to adjust the calling code slightly to handle the NULL
return). Then the stub code only needs to be able to see the
'typedef struct MonitorDef MonitorDef' (which you can put in
qemu-typedefs.h).
-- PMM
- Re: [Qemu-devel] [PATCH 3/3] monitor: added generation of documentation for hmp-commands-info.hx, (continued)
[Qemu-devel] [PATCH 1/3] hmp-commands-info: move info_cmds content out of monitor.c, Denis V. Lunev, 2015/08/12
[Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c, Denis V. Lunev, 2015/08/12
Re: [Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor, Denis V. Lunev, 2015/08/18
Re: [Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor, Denis V. Lunev, 2015/08/25
Re: [Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor, Markus Armbruster, 2015/08/28