mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/arm: Handle gdb_core_xml_file in TYPE_ARM_CPU
Instead of having the TYPE_AARCH64_CPU subclass set CPUClass:gdb_core_xml_file to a different value from that that TYPE_ARM_CPU uses, implement the gdb_get_core_xml_file method in the TYPE_ARM_CPU class to return either the AArch64 or AArch32 XML file name. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250317142819.900029-5-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
bae9fb4b01
commit
984ea94818
3 changed files with 15 additions and 3 deletions
|
@ -2658,6 +2658,20 @@ static const gchar *arm_gdb_arch_name(CPUState *cs)
|
|||
return "arm";
|
||||
}
|
||||
|
||||
static const char *arm_gdb_get_core_xml_file(CPUState *cs)
|
||||
{
|
||||
ARMCPU *cpu = ARM_CPU(cs);
|
||||
CPUARMState *env = &cpu->env;
|
||||
|
||||
if (arm_gdbstub_is_aarch64(cpu)) {
|
||||
return "aarch64-core.xml";
|
||||
}
|
||||
if (arm_feature(env, ARM_FEATURE_M)) {
|
||||
return "arm-m-profile.xml";
|
||||
}
|
||||
return "arm-core.xml";
|
||||
}
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#include "hw/core/sysemu-cpu-ops.h"
|
||||
|
||||
|
@ -2727,6 +2741,7 @@ static void arm_cpu_class_init(ObjectClass *oc, const void *data)
|
|||
cc->sysemu_ops = &arm_sysemu_ops;
|
||||
#endif
|
||||
cc->gdb_arch_name = arm_gdb_arch_name;
|
||||
cc->gdb_get_core_xml_file = arm_gdb_get_core_xml_file;
|
||||
cc->gdb_stop_before_watchpoint = true;
|
||||
cc->disas_set_info = arm_disas_set_info;
|
||||
|
||||
|
@ -2749,7 +2764,6 @@ static void cpu_register_class_init(ObjectClass *oc, const void *data)
|
|||
CPUClass *cc = CPU_CLASS(acc);
|
||||
|
||||
acc->info = data;
|
||||
cc->gdb_core_xml_file = "arm-core.xml";
|
||||
if (acc->info->deprecation_note) {
|
||||
cc->deprecation_note = acc->info->deprecation_note;
|
||||
}
|
||||
|
|
|
@ -819,7 +819,6 @@ static void aarch64_cpu_class_init(ObjectClass *oc, const void *data)
|
|||
|
||||
cc->gdb_read_register = aarch64_cpu_gdb_read_register;
|
||||
cc->gdb_write_register = aarch64_cpu_gdb_write_register;
|
||||
cc->gdb_core_xml_file = "aarch64-core.xml";
|
||||
|
||||
object_class_property_add_bool(oc, "aarch64", aarch64_cpu_get_aarch64,
|
||||
aarch64_cpu_set_aarch64);
|
||||
|
|
|
@ -266,7 +266,6 @@ static void arm_v7m_class_init(ObjectClass *oc, const void *data)
|
|||
|
||||
acc->info = data;
|
||||
cc->tcg_ops = &arm_v7m_tcg_ops;
|
||||
cc->gdb_core_xml_file = "arm-m-profile.xml";
|
||||
}
|
||||
|
||||
static const ARMCPUInfo arm_v7m_cpus[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue