monitor: Remove target_get_monitor_def()
target_get_monitor_def() is now only a dead stub. Remove as pointless. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260427080738.77138-22-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Mar 20, 2026 at 09:33 UTC
b6bcef157e3c2a0648f8bd8a79deb793cfb43fb3
4 files changed
+3
-42
include/monitor/hmp-target.h
-1
@@ -38,7 +38,6 @@ struct MonitorDef {
38
#endif
39
40
const MonitorDef *target_monitor_defs(void);
41
-int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval);
41
42
CPUArchState *mon_get_cpu_env(Monitor *mon);
43
CPUState *mon_get_cpu(Monitor *mon);
monitor/hmp-target.c
+3
-11
@@ -66,8 +66,6 @@ int get_monitor_def(Monitor *mon, int64_t *pval, const char *name)
66
const MonitorDef *md = target_monitor_defs();
67
CPUState *cs = mon_get_cpu(mon);
68
void *ptr;
69
- uint64_t tmp = 0;
70
- int ret;
69
70
if (cs == NULL || md == NULL) {
71
return -1;
@@ -86,16 +84,10 @@ int get_monitor_def(Monitor *mon, int64_t *pval, const char *name)
84
}
85
}
86
89
- if (cs->cc->sysemu_ops->monitor_get_register) {
90
- ret = cs->cc->sysemu_ops->monitor_get_register(cs, name, pval);
91
- } else {
92
- ret = target_get_monitor_def(cs, name, &tmp);
93
- if (!ret) {
94
- *pval = (target_long) tmp;
95
- }
87
+ if (!cs->cc->sysemu_ops->monitor_get_register) {
88
+ return -1;
89
}
97
-
98
- return ret;
90
+ return cs->cc->sysemu_ops->monitor_get_register(cs, name, pval);
91
}
92
93
static int
stubs/meson.build
-1
@@ -75,7 +75,6 @@ if have_system
75
stub_ss.add(files('igvm.c'))
76
endif
77
stub_ss.add(files('kvm.c'))
78
- stub_ss.add(files('target-get-monitor-def.c'))
78
stub_ss.add(files('target-monitor-defs.c'))
79
stub_ss.add(files('win32-kbd-hook.c'))
80
stub_ss.add(files('xen-hw-stub.c'))
stubs/target-get-monitor-def.c
deleted
-29
@@ -1,29 +0,0 @@
1
-/*
2
- * Stub for target_get_monitor_def.
3
- *
4
- * Copyright IBM Corp., 2015
5
- *
6
- * Author: Alexey Kardashevskiy <aik@ozlabs.ru>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License,
11
- * or (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
20
- */
21
-
22
-#include "qemu/osdep.h"
23
-
24
-int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval);
25
-
26
-int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)
27
-{
28
- return -1;
29
-}