mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
qdev: add monitor command to dump the tree.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
1431b6a17e
commit
cae4956e5e
4 changed files with 93 additions and 0 deletions
12
hw/sysbus.c
12
hw/sysbus.c
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "sysbus.h"
|
||||
#include "sysemu.h"
|
||||
#include "monitor.h"
|
||||
|
||||
void sysbus_connect_irq(SysBusDevice *dev, int n, qemu_irq irq)
|
||||
{
|
||||
|
@ -150,3 +151,14 @@ DeviceState *sysbus_create_varargs(const char *name,
|
|||
}
|
||||
return dev;
|
||||
}
|
||||
|
||||
void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent)
|
||||
{
|
||||
SysBusDevice *s = sysbus_from_qdev(dev);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < s->num_mmio; i++) {
|
||||
monitor_printf(mon, "%*smmio " TARGET_FMT_plx "/" TARGET_FMT_plx "\n",
|
||||
indent, "", s->mmio[i].addr, s->mmio[i].size);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue