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

2013-10-07 Thread Fabien Chouteau
On 10/07/2013 03:29 PM, Peter Maydell wrote: > On 7 October 2013 22:06, Fabien Chouteau wrote: >> 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 wrot

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

2013-10-07 Thread Peter Maydell
On 7 October 2013 22:06, Fabien Chouteau wrote: > 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: > +extern const MonitorDef i386_monitor_defs

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

2013-10-07 Thread Fabien Chouteau
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" #

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

2013-10-07 Thread Peter Maydell
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" >>> >>>

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

2013-10-07 Thread Fabien Chouteau
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

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

2013-10-04 Thread Andreas Färber
Am 04.10.2013 19:49, schrieb Peter Maydell: > On 5 October 2013 01:57, Fabien Chouteau wrote: > >> --- a/target-sparc/cpu-qom.h >> +++ b/target-sparc/cpu-qom.h >> @@ -21,7 +21,6 @@ >> #define QEMU_SPARC_CPU_QOM_H >> >> #include "qom/cpu.h" >> -#include "cpu.h" > > ...why have you deleted this

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

2013-10-04 Thread Peter Maydell
On 5 October 2013 01:57, Fabien Chouteau wrote: > --- a/target-i386/cpu-qom.h > +++ b/target-i386/cpu-qom.h > @@ -23,6 +23,7 @@ > #include "qom/cpu.h" > #include "cpu.h" > #include "qapi/error.h" > +#include "monitor/monitor_def.h" > #ifdef TARGET_X86_64 > #define TYPE_X86_CPU "x86_64-cpu" >

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

2013-10-04 Thread Fabien Chouteau
Everything has been moved to cpu specific directories (SPARC, PPC, i386). Signed-off-by: Fabien Chouteau --- include/monitor/monitor_def.h | 18 ++ include/qemu/typedefs.h |1 + include/qom/cpu.h |3 + monitor.c | 396 +

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

2013-10-01 Thread Fabien Chouteau
On 10/01/2013 05:21 PM, Peter Maydell wrote: > The declaration should go in cpu-qom.h (again, compare > the gdb stuff), and it should be called "arm_monitor_defs", > "ppc_monitor_defs" etc, not arch_monitor_defs. (This > avoids issues if we ever manage to compile more than one > target CPU into a s

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

2013-10-01 Thread Peter Maydell
On 2 October 2013 00:13, Richard Henderson wrote: > On 10/01/2013 07:28 AM, Fabien Chouteau wrote: >> On 10/01/2013 04:00 AM, Richard Henderson wrote: >>> On 09/30/2013 08:57 AM, Fabien Chouteau wrote: +extern const MonitorDef arch_monitor_defs[]; >>> >>> This is supplied by target-foo/monito

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

2013-10-01 Thread Richard Henderson
On 10/01/2013 07:28 AM, Fabien Chouteau wrote: > On 10/01/2013 04:00 AM, Richard Henderson wrote: >> On 09/30/2013 08:57 AM, Fabien Chouteau wrote: >>> +extern const MonitorDef arch_monitor_defs[]; >> >> This is supplied by target-foo/monitor.c, right? >> Why in the world is it declared in generic

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

2013-10-01 Thread Peter Maydell
On 1 October 2013 23:23, Fabien Chouteau wrote: > On 10/01/2013 03:08 AM, Peter Maydell wrote: >> I like this generally, but this detail is wrong. These changes >> mean that these registers (and many others) are now described >> as being int64_t wide rather than target_long wide, so you'll >> find

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

2013-10-01 Thread Fabien Chouteau
On 10/01/2013 04:00 AM, Richard Henderson wrote: > On 09/30/2013 08:57 AM, Fabien Chouteau wrote: >> +extern const MonitorDef arch_monitor_defs[]; > > This is supplied by target-foo/monitor.c, right? > Why in the world is it declared in generic code? > Yes, why? > Especially if it's only ever acc

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

2013-10-01 Thread Fabien Chouteau
On 10/01/2013 03:08 AM, Peter Maydell wrote: > On 1 October 2013 00:57, Fabien Chouteau wrote: > >> +#define MD_I64 0 >> +#define MD_I32 1 > >> -#define MD_TLONG 0 >> -#define MD_I32 1 > >> -{ "eax", offsetof(CPUX86State, regs[0]) }, >> -{ "ecx", offsetof(CPUX86State, regs[1]) }, > >

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

2013-09-30 Thread Richard Henderson
On 09/30/2013 08:57 AM, Fabien Chouteau wrote: > +extern const MonitorDef arch_monitor_defs[]; This is supplied by target-foo/monitor.c, right? Why in the world is it declared in generic code? Especially if it's only ever accessed via the cpu->monitor_defs member? r~

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

2013-09-30 Thread Peter Maydell
On 1 October 2013 00:57, Fabien Chouteau wrote: > +#define MD_I64 0 > +#define MD_I32 1 > -#define MD_TLONG 0 > -#define MD_I32 1 > -{ "eax", offsetof(CPUX86State, regs[0]) }, > -{ "ecx", offsetof(CPUX86State, regs[1]) }, > +{ "eax", offsetof(CPUX86State, regs[0]) }, > +{ "ec

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

2013-09-30 Thread Fabien Chouteau
Everything has been moved to cpu specific directories (SPARC, PPC, i386). Signed-off-by: Fabien Chouteau --- include/monitor/monitor.h | 16 ++ include/qemu/typedefs.h |1 + include/qom/cpu.h |3 + monitor.c | 399 +