On 29/09/2015 15:23, Dr. David Alan Gilbert wrote: > Yeh, I'm not sure how easily that'll be to glue into the monitor, > because the monitor has a parser that's fed somehow from the chardev.
See how qmp_human_monitor_command is implemented. It basically bypasses the chardev part of the monitor. Because this "source" command would be HMP-only, it wouldn't even need to create a new monitor, save/restore cur_mon and fetch the output from hmp.outbuf. It could just read lines and pass them to handle_hmp_command (possibly after removing newlines preceded by a backslash?). Paolo