aboutsummaryrefslogtreecommitdiff
path: root/hw/sysbus.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-06-05 15:53:17 +0100
committerPaul Brook <paul@codesourcery.com>2009-06-05 15:53:17 +0100
commitcae4956e5efcd7898583627ea712923902384c55 (patch)
treef5e68b7d1c6e01236d3c4372a9ca683f3fa3308a /hw/sysbus.c
parent1431b6a17e6546569e09bcf8fb7773c925658d8f (diff)
qdev: add monitor command to dump the tree.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/sysbus.c')
-rw-r--r--hw/sysbus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/sysbus.c b/hw/sysbus.c
index a1843088e3..fbd2ddf394 100644
--- a/hw/sysbus.c
+++ b/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);
+ }
+}