[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/12] target/arm: Move the reference to arm-core.xml
From: |
Akihiko Odaki |
Subject: |
[PATCH v3 06/12] target/arm: Move the reference to arm-core.xml |
Date: |
Wed, 13 Sep 2023 07:40:55 +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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
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 0bb0585441..6ff6ff2d55 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -2389,7 +2389,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;
@@ -2411,8 +2410,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.42.0
- [PATCH v3 00/12] gdbstub and TCG plugin improvements, Akihiko Odaki, 2023/09/12
- [PATCH v3 01/12] gdbstub: Fix target_xml initialization, Akihiko Odaki, 2023/09/12
- [PATCH v3 02/12] gdbstub: Fix target.xml response, Akihiko Odaki, 2023/09/12
- [PATCH v3 03/12] plugins: Check if vCPU is realized, Akihiko Odaki, 2023/09/12
- [PATCH v3 04/12] contrib/plugins: Use GRWLock in execlog, Akihiko Odaki, 2023/09/12
- [PATCH v3 05/12] gdbstub: Introduce GDBFeature structure, Akihiko Odaki, 2023/09/12
- [PATCH v3 06/12] target/arm: Move the reference to arm-core.xml,
Akihiko Odaki <=
- [PATCH v3 07/12] hw/core/cpu: Return static value with gdb_arch_name(), Akihiko Odaki, 2023/09/12
- [PATCH v3 08/12] gdbstub: Use g_markup_printf_escaped(), Akihiko Odaki, 2023/09/12
- [PATCH v3 09/12] target/arm: Remove references to gdb_has_xml, Akihiko Odaki, 2023/09/12
- [PATCH v3 10/12] target/ppc: Remove references to gdb_has_xml, Akihiko Odaki, 2023/09/12
- [PATCH v3 11/12] gdbstub: Remove gdb_has_xml variable, Akihiko Odaki, 2023/09/12
- [PATCH v3 12/12] gdbstub: Replace gdb_regs with an array, Akihiko Odaki, 2023/09/12
- Re: [PATCH v3 00/12] gdbstub and TCG plugin improvements, Alex Bennée, 2023/09/14