Skip to content

Commit

Permalink
target/arm: Move the reference to arm-core.xml
Browse files Browse the repository at this point in the history
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>
Message-Id: <20230912224107.29669-7-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231009164104.369749-14-alex.bennee@linaro.org>
  • Loading branch information
akihikodaki authored and stsquad committed Oct 11, 2023
1 parent 956af7d commit 48de646
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/arm/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,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;
Expand All @@ -2414,8 +2413,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)
Expand Down

0 comments on commit 48de646

Please sign in to comment.