[Top][All Lists]

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

Re: [Qemu-trivial] [PATCH 3/3] Add ARM registers definitions in Monitor

From: Peter Maydell
Subject: Re: [Qemu-trivial] [PATCH 3/3] Add ARM registers definitions in Monitor commands
Date: Thu, 26 Sep 2013 00:51:32 +0900

On 26 September 2013 00:38, Fabien Chouteau <address@hidden> wrote:
> On 09/25/2013 01:53 AM, Peter Maydell wrote:
>> No, I really don't want to see another target #ifdef ladder, please.
>> Put a 'static const MonitorDef *monitor_defs;' into CPUClass,
>> and initialize it in each target's class init function, please.
>> (You'll need to move the appropriate sections of the current
>> static array in monitor.c plus the per-target functions that
>> it references into target-*/cpu.c.) Look at gdb_num_core_regs
>> as an example of where we made this kind of abstraction.
> I tried already. Where whould you put the declaration of MonitorDef type?

It doesn't matter very much, but monitor.h seems the obvious
place. You probably don't want qom/cpu.h to have to drag in
monitor.h so a 'struct MonitorDef;' forward declaration in cpu.h
will let you avoid that (we do that already for a few other structs).

-- PMM

reply via email to

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