monitor: Remove 'monitor/hmp-target.h' header

The "monitor/hmp-target.h" header doesn't contain any
target-specific declarations anymore. Merge it with
"monitor/hmp.h", its target-agnostic counterpart.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260427080738.77138-25-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé
2026-01-29 14:18:36 +01:00
parent 8758e250bf
commit 0d111ac47d
19 changed files with 12 additions and 59 deletions

View File

@@ -3415,7 +3415,6 @@ F: hmp.h
F: hmp-commands*.hx
F: include/monitor/hmp.h
F: include/monitor/hmp-completion.h
F: include/monitor/hmp-target.h
F: tests/qtest/test-hmp.c
F: include/qemu/qemu-print.h
F: util/qemu-print.c

View File

@@ -1,7 +1,6 @@
#include "qemu/osdep.h"
#include "monitor/monitor.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "hw/i386/pc.h"
#include "hw/i386/sgx-epc.h"
#include "qapi/qapi-commands-misc-i386.h"

View File

@@ -17,7 +17,6 @@
#include "monitor/qdev.h"
#include "monitor/monitor.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qapi/qapi-commands-misc-i386.h"

View File

@@ -1,41 +0,0 @@
/*
* QEMU monitor
*
* Copyright (c) 2003-2004 Fabrice Bellard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MONITOR_HMP_TARGET_H
#define MONITOR_HMP_TARGET_H
typedef struct MonitorDef MonitorDef;
struct MonitorDef {
const char *name;
int offset;
int64_t (*get_value)(Monitor *mon, const MonitorDef *md, int offset);
};
const MonitorDef *target_monitor_defs(void);
CPUArchState *mon_get_cpu_env(Monitor *mon);
CPUState *mon_get_cpu(Monitor *mon);
#endif /* MONITOR_HMP_TARGET_H */

View File

@@ -24,6 +24,17 @@
g_assert_not_reached(); \
}
typedef struct MonitorDef {
const char *name;
int offset;
int64_t (*get_value)(Monitor *mon, const struct MonitorDef *md, int offset);
} MonitorDef;
const MonitorDef *target_monitor_defs(void);
CPUArchState *mon_get_cpu_env(Monitor *mon);
CPUState *mon_get_cpu(Monitor *mon);
bool hmp_handle_error(Monitor *mon, Error *err);
void hmp_help_cmd(Monitor *mon, const char *name);
strList *hmp_split_at_comma(const char *str);

View File

@@ -22,7 +22,6 @@
#include "monitor/hmp.h"
#include "qemu/help_option.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "monitor/monitor-internal.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-control.h"

View File

@@ -28,7 +28,6 @@
#include "monitor/qdev.h"
#include "net/slirp.h"
#include "system/device_tree.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
#include "monitor/hmp-completion.h"
#include "block/block-hmp-cmds.h"

View File

@@ -28,7 +28,6 @@
#include "hw/core/sysemu-cpu-ops.h"
#include "monitor-internal.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "qobject/qdict.h"
#include "qobject/qnum.h"
#include "qemu/bswap.h"

View File

@@ -1,5 +1,5 @@
#include "qemu/osdep.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
const MonitorDef *target_monitor_defs(void)
{

View File

@@ -11,7 +11,6 @@
#include "qapi/error.h"
#include "monitor/monitor.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "system/hw_accel.h"
#include "system/kvm.h"
#include "system/xen.h"

View File

@@ -25,7 +25,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "monitor/monitor.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
#include "qobject/qdict.h"
#include "qapi/error.h"

View File

@@ -14,7 +14,6 @@
#include "qemu/osdep.h"
#include "monitor/monitor.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "qapi/error.h"
#include "sev.h"

View File

@@ -40,7 +40,6 @@
#include "qom/object.h"
#include "monitor/monitor.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "qapi/qapi-commands-misc-i386.h"
#include "confidential-guest.h"
#include "hw/i386/pc.h"

View File

@@ -8,7 +8,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "monitor/monitor.h"
void hmp_info_tlb(Monitor *mon, const QDict *qdict)

View File

@@ -7,9 +7,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/ctype.h"
#include "monitor/monitor.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
#include "cpu.h"

View File

@@ -25,7 +25,6 @@
#include "cpu_bits.h"
#include "monitor/monitor.h"
#include "monitor/hmp.h"
#include "monitor/hmp-target.h"
#include "system/memory.h"
#include "internals.h"

View File

@@ -24,7 +24,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "monitor/monitor.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
static void print_tlb(Monitor *mon, int idx, tlb_t *tlb)

View File

@@ -24,7 +24,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "monitor/monitor.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"

View File

@@ -24,7 +24,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "monitor/monitor.h"
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
void hmp_info_tlb(Monitor *mon, const QDict *qdict)