diff mbox series

[not-for-merge,4/5] qdev: Instrument to detect missed QOM parenting

Message ID 20200518051945.8621-5-armbru@redhat.com
State New
Headers show
Series None | expand

Commit Message

Markus Armbruster May 18, 2020, 5:19 a.m. UTC
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qdev-monitor.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/qdev-monitor.c b/qdev-monitor.c
index 07f78e9f5d..ec4e134ff7 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -801,6 +801,10 @@  static void qbus_print(Monitor *mon, BusState *bus, int indent)
         struct qbus_child *qc = children->data;
         DeviceState *dev = qc->dev;
         GSList *next = children->next;
+        if (!qc->qom_path) {
+            printf("### no qom path: %s, id \"%s\"\n",
+                   object_get_typename(OBJECT(dev)), dev->id ? dev->id : "");
+        }
         qdev_print(mon, dev, indent);
         g_free(qc->qom_path);
         g_free(qc);