[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/24] target/arm: Move the reference to arm-core.xml
From: |
Akihiko Odaki |
Subject: |
[PATCH v2 05/24] target/arm: Move the reference to arm-core.xml |
Date: |
Wed, 2 Aug 2023 17:45:53 +0900 |
Some subclasses overwrite gdb_core_xml_file member but others don't.
Always initialize the member in the subclasses for consistency.
This especially helps for AArch64; in a following change, the file
specified by gdb_core_xml_file is always looked up even if it's going to
be overwritten later. Looking up arm-core.xml results in an error as
it will not be embedded in the AArch64 build.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
target/arm/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 93c28d50e5..d71a162070 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -2354,7 +2354,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void
*data)
cc->sysemu_ops = &arm_sysemu_ops;
#endif
cc->gdb_num_core_regs = 26;
- cc->gdb_core_xml_file = "arm-core.xml";
cc->gdb_arch_name = arm_gdb_arch_name;
cc->gdb_get_dynamic_xml = arm_gdb_get_dynamic_xml;
cc->gdb_stop_before_watchpoint = true;
@@ -2376,8 +2375,10 @@ static void arm_cpu_instance_init(Object *obj)
static void cpu_register_class_init(ObjectClass *oc, void *data)
{
ARMCPUClass *acc = ARM_CPU_CLASS(oc);
+ CPUClass *cc = CPU_CLASS(acc);
acc->info = data;
+ cc->gdb_core_xml_file = "arm-core.xml";
}
void arm_cpu_register(const ARMCPUInfo *info)
--
2.41.0
- [PATCH v2 00/24] plugins: Allow to read registers, Akihiko Odaki, 2023/08/02
- [PATCH v2 01/24] contrib/plugins: Use GRWLock in execlog, Akihiko Odaki, 2023/08/02
- [PATCH v2 02/24] gdbstub: Introduce GDBFeature structure, Akihiko Odaki, 2023/08/02
- [PATCH v2 03/24] gdbstub: Add num_regs member to GDBFeature, Akihiko Odaki, 2023/08/02
- [PATCH v2 04/24] gdbstub: Introduce gdb_find_static_feature(), Akihiko Odaki, 2023/08/02
- [PATCH v2 05/24] target/arm: Move the reference to arm-core.xml,
Akihiko Odaki <=
- [PATCH v2 06/24] hw/core/cpu: Replace gdb_core_xml_file with gdb_core_feature, Akihiko Odaki, 2023/08/02
- [PATCH v2 07/24] target/arm: Use GDBFeature for dynamic XML, Akihiko Odaki, 2023/08/02
- [PATCH v2 08/24] target/ppc: Use GDBFeature for dynamic XML, Akihiko Odaki, 2023/08/02
- [PATCH v2 09/24] target/riscv: Use GDBFeature for dynamic XML, Akihiko Odaki, 2023/08/02
- [PATCH v2 10/24] gdbstub: Use GDBFeature for gdb_register_coprocessor, Akihiko Odaki, 2023/08/02
- [PATCH v2 11/24] gdbstub: Use GDBFeature for GDBRegisterState, Akihiko Odaki, 2023/08/02
- [PATCH v2 12/24] gdbstub: Simplify XML lookup, Akihiko Odaki, 2023/08/02
- [PATCH v2 13/24] hw/core/cpu: Remove gdb_get_dynamic_xml member, Akihiko Odaki, 2023/08/02
- [PATCH v2 14/24] gdbstub: Add members to identify registers to GDBFeature, Akihiko Odaki, 2023/08/02
- [PATCH v2 15/24] target/arm: Fill new members of GDBFeature, Akihiko Odaki, 2023/08/02