qom: Implement info qom-tree HMP command

To complement qdev's bus-oriented info qtree, info qom-tree
prints a hierarchical view of the QOM composition tree.

By default, the machine composition tree is shown. This can be overriden
by supplying a path argument, such as "info qom-tree /".

Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Andreas Färber 2014-05-07 17:03:18 +02:00
parent c0e6ee9e6f
commit a01ff75fcd
4 changed files with 67 additions and 0 deletions

View file

@ -2889,6 +2889,13 @@ static mon_cmd_t info_cmds[] = {
.help = "show qdev device model list",
.mhandler.cmd = hmp_info_qdm,
},
{
.name = "qom-tree",
.args_type = "path:s?",
.params = "[path]",
.help = "show QOM composition tree",
.mhandler.cmd = hmp_info_qom_tree,
},
{
.name = "roms",
.args_type = "",