From 2fc5d01bb43049851a95c8a66df7ee33e3489b54 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 13 Nov 2020 12:43:24 +0100 Subject: hmp: Pass monitor to mon_get_cpu() mon_get_cpu() is indirectly called monitor_parse_arguments() where the current monitor isn't set yet. Instead of using monitor_cur(), explicitly pass the Monitor pointer to the function. Signed-off-by: Kevin Wolf Message-Id: <20201113114326.97663-2-kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- include/monitor/hmp-target.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/monitor/hmp-target.h') diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h index 8b7820a3ad..519616d1fb 100644 --- a/include/monitor/hmp-target.h +++ b/include/monitor/hmp-target.h @@ -41,7 +41,7 @@ const MonitorDef *target_monitor_defs(void); int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval); CPUArchState *mon_get_cpu_env(void); -CPUState *mon_get_cpu(void); +CPUState *mon_get_cpu(Monitor *mon); void hmp_info_mem(Monitor *mon, const QDict *qdict); void hmp_info_tlb(Monitor *mon, const QDict *qdict); -- cgit v1.2.3