]> git.proxmox.com Git - qemu.git/commit - monitor.c
monitor: Convert do_info_cpus() to QObject
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 7 Oct 2009 16:42:04 +0000 (13:42 -0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 9 Oct 2009 02:17:19 +0000 (21:17 -0500)
commit8f3cec0be8ed3f7c3bfaf8521e6316bdb76a56fe
treecd156a6d09735993e38b3cda400fbbfe954ac4f0
parentcc1d9c70152ecb9bb85908af31c04b1e80bce34d
monitor: Convert do_info_cpus() to QObject

Each CPU information is stored in a QDict and the returned
QObject is a QList of all CPUs.

The QDict contains the following information:

- "CPU": cpu index
- "current": "yes" or "no"
- "pc": current PC
- "halted": "yes" or "no"

The user output in the Monitor should not change and the
future monitor protocol is expected to emit something like:

[ { "CPU": 0, "current": "yes", "pc": 0x..., "halted": "no" },
{ "CPU": 1, "current": "no",  "pc": 0x..., "halted": "yes" } ]

which corresponds to the following user output:

* CPU #0: pc=0x00000000fffffff0
CPU #1: pc=0x00000000fffffff0 (halted)

Patchworks-ID: 35352
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor.c