target_get_monitor_def() is now only a stub. Remove as pointless.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
include/monitor/hmp.h | 2 --
monitor/hmp.c | 7 +++----
stubs/target-get-monitor-def.c | 29 -----------------------------
stubs/meson.build | 1 -
4 files changed, 3 insertions(+), 36 deletions(-)
delete mode 100644 stubs/target-get-monitor-def.c
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
index ea7e53060a0..a335e4ccd3e 100644
--- a/include/monitor/hmp.h
+++ b/include/monitor/hmp.h
@@ -23,8 +23,6 @@ struct MonitorDef {
int64_t (*get_value)(Monitor *mon, const struct MonitorDef *md, int
offset);
};
-int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval);
-
CPUArchState *mon_get_cpu_env(Monitor *mon);
CPUState *mon_get_cpu(Monitor *mon);
diff --git a/monitor/hmp.c b/monitor/hmp.c
index ad253347892..33197b35e41 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -1628,11 +1628,10 @@ int get_monitor_def(Monitor *mon, int64_t *pval, const
char *name)
}
}
- if (cs->cc->legacy_monitor_get_register) {
- ret = cs->cc->legacy_monitor_get_register(cs, name, &tmp);
- } else {
- ret = target_get_monitor_def(cs, name, &tmp);
+ if (!cs->cc->legacy_monitor_get_register) {
+ return -1;
}
+ ret = cs->cc->legacy_monitor_get_register(cs, name, &tmp);
if (!ret) {
*pval = target_long_bits() == 32 ? (int32_t)tmp : tmp;
}
diff --git a/stubs/target-get-monitor-def.c b/stubs/target-get-monitor-def.c
deleted file mode 100644
index 394e0f9a7d2..00000000000
--- a/stubs/target-get-monitor-def.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Stub for target_get_monitor_def.
- *
- * Copyright IBM Corp., 2015
- *
- * Author: Alexey Kardashevskiy <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "qemu/osdep.h"
-
-int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval);
-
-int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)
-{
- return -1;
-}
diff --git a/stubs/meson.build b/stubs/meson.build
index 10eb68ab55e..85f9e3a4f23 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -74,7 +74,6 @@ if have_system
stub_ss.add(files('igvm.c'))
endif
stub_ss.add(files('kvm.c'))
- stub_ss.add(files('target-get-monitor-def.c'))
stub_ss.add(files('win32-kbd-hook.c'))
stub_ss.add(files('xen-hw-stub.c'))
stub_ss.add(files('monitor-arm-gic.c'))
--
2.53.0