Monitor patches for 2019-06-17
The following changes since commit 076243ffe6c1b687e9e6d98348c3bf3398df78f3:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-docs-20190617' into staging (2019-06-17 16:41:25 +0100)
are available in the Git repository at:
git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2019-06-17-v2
for you to fetch changes up to 3c45f62570aeacadf4a05bfa1afaa12bea05ae86:
vl: Deprecate -mon pretty=... for HMP monitors (2019-06-18 08:14:17 +0200)
----------------------------------------------------------------
Monitor patches for 2019-06-17
----------------------------------------------------------------
Kevin Wolf (15):
monitor: Remove unused password prompting fields
monitor: Split monitor_init in HMP and QMP function
monitor: Make MonitorQMP a child class of Monitor
monitor: Create MonitorHMP with readline state
monitor: Remove Monitor.cmd_table indirection
monitor: Rename HMP command type and tables
Move monitor.c to monitor/misc.c
monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c
monitor: Create monitor-internal.h with common definitions
monitor: Split out monitor/qmp.c
monitor: Split out monitor/hmp.c
monitor: Split out monitor/monitor.c
monitor: Split Monitor.flags into separate bools
monitor: Replace monitor_init() with monitor_init_{hmp, qmp}()
vl: Deprecate -mon pretty=... for HMP monitors
Yury Kotov (1):
monitor: Fix return type of monitor_fdset_dup_fd_find
MAINTAINERS | 13 +- Makefile.objs | 4 +- Makefile.target | 3 +- chardev/char.c | 2 +- docs/devel/writing-qmp-commands.txt | 11 +- gdbstub.c | 2 +- hmp-commands.hx | 2 +- include/monitor/monitor.h | 17 +- monitor.c | 4729 ----------------------------------- monitor/Makefile.objs | 3 + hmp.c => monitor/hmp-cmds.c | 7 +- monitor/hmp.c | 1417 +++++++++++ monitor/misc.c | 2353 +++++++++++++++++ monitor/monitor-internal.h | 183 ++ monitor/monitor.c | 628 +++++ qmp.c => monitor/qmp-cmds.c | 2 +- monitor/qmp.c | 404 +++ monitor/trace-events | 15 + qemu-deprecated.texi | 6 + stubs/fdset.c | 2 +- stubs/monitor.c | 6 +- tests/test-util-sockets.c | 3 +- trace-events | 10 - vl.c | 28 +- 24 files changed, 5073 insertions(+), 4777 deletions(-) delete mode 100644 monitor.c create mode 100644 monitor/Makefile.objs rename hmp.c => monitor/hmp-cmds.c (99%) create mode 100644 monitor/hmp.c create mode 100644 monitor/misc.c create mode 100644 monitor/monitor-internal.h create mode 100644 monitor/monitor.c rename qmp.c => monitor/qmp-cmds.c (99%) create mode 100644 monitor/qmp.c create mode 100644 monitor/trace-events
Signature · 1 line
2.21.0
[Qemu-devel] [PULL v2 12/16] monitor: Split out monitor/hmp.c
From: Kevin Wolf <[email protected]>
Move HMP infrastructure from monitor/misc.c to monitor/hmp.c. This is code that can be shared for all targets, so compile it only once.
The amount of function and particularly extern variables in monitor_int.h is probably a bit larger than it needs to be, but this way no non-trivial code modifications are needed. The interfaces between HMP and the monitor core can be cleaned up later.
Message-Id: <[email protected]>
[Comment reformatted to make checkpatch.pl happy, #include <dirent.h> moved to fix Windows build, superfluous #include dropped]
--- monitor/Makefile.objs | 2 +- monitor/hmp.c | 1417 ++++++++++++++++++++++++++++++++++++ monitor/misc.c | 1368 +--------------------------------- monitor/monitor-internal.h | 8 + monitor/trace-events | 4 +- 5 files changed, 1445 insertions(+), 1354 deletions(-) create mode 100644 monitor/hmp.c
monitor/Makefile.objs +1 -1
@@ -1,3 +1,3 @@ obj-y += misc.o -common-obj-y += qmp.o +common-obj-y += qmp.o hmp.o common-obj-y += qmp-cmds.o hmp-cmds.o
monitor/hmp.c new file +1417 -0
1,417 lines not on this page · raw message
monitor/misc.c +16 -1352
1,484 lines not on this page · raw message
monitor/monitor-internal.h +8 -0
@@ -159,7 +159,10 @@ extern QemuMutex monitor_lock;extern MonitorList mon_list;extern int mon_refcount; +extern HMPCommand hmp_cmds[]; +void monitor_init_qmp (Chardev *chr,int flags); +void monitor_init_hmp (Chardev *chr,int flags);int monitor_puts (Monitor *mon,const char *str); void monitor_data_init(Monitor *mon, int flags, bool skip_flush,
@@ -172,4 +175,9 @@ void qmp_send_response(MonitorQMP *mon, const QDict *rsp);void monitor_data_destroy_qmp (MonitorQMP *mon);void monitor_qmp_bh_dispatcher (void *data); +int get_monitor_def (int64_t *pval,const char *name); +void help_cmd (Monitor *mon,const char *name); +void handle_hmp_command (MonitorHMP *mon,const char *cmdline); +int hmp_compare_cmd (const char *name,const char *list); +#endif
monitor/trace-events +3 -1
@@ -1,10 +1,12 @@ # See docs/devel/tracing.txt for syntax documentation. +# hmp.c +handle_hmp_command(void *mon, const char *cmdline) "mon %p cmdline: %s" + # misc.c monitor_protocol_event_handler(uint32_t event, void *qdict) "event=%d data=%p" monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p" monitor_protocol_event_queue(uint32_t event, void *qdict, uint64_t rate) "event=%d data=%p rate=%" PRId64 -handle_hmp_command(void *mon, const char *cmdline) "mon %p cmdline: %s" monitor_suspend(void *ptr, int cnt) "mon %p: %d" # qmp.c
Signature · 1 line
2.21.0
Peter Maydell
AppliedQuoted 34 lines · Markus Armbruster
The following changes since commit
076243ffe6c1b687e9e6d98348c3bf3398df78f3:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-docs-20190617' into staging (2019-06-17 16:41:25 +0100)
are available in the Git repository at:
git://repo.or.cz/qemu/armbru.gittags/pull-monitor-2019-06-17-v2for you to fetch changes up to
3c45f62570aeacadf4a05bfa1afaa12bea05ae86:vl: Deprecate -mon pretty=... for HMP monitors (2019-06-18 08:14:17 +0200)
----------------------------------------------------------------
Monitor patches for 2019-06-17----------------------------------------------------------------
Kevin Wolf (15):
monitor: Remove unused password prompting fields
monitor: Splitmonitor_initin HMP and QMP function
monitor: Make MonitorQMP a child class of Monitor
monitor: Create MonitorHMP with readline state
monitor: Remove Monitor.cmd_table indirection
monitor: Rename HMP command type and tables
Movemonitor.ctomonitor/misc.c
monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c
monitor: Createmonitor-internal.hwith common definitions
monitor: Split outmonitor/qmp.c
monitor: Split outmonitor/hmp.c
monitor: Split outmonitor/monitor.c
monitor: Split Monitor.flags into separate bools
monitor: Replacemonitor_init()with monitor_init_{hmp, qmp}()
vl: Deprecate -mon pretty=... for HMP monitors
Quoted 2 lines
Yury Kotov (1):
monitor: Fix return type ofmonitor_fdset_dup_fd_find
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.
-- PMM