On 3/23/21 9:46 AM, Claudio Fontana wrote:
-static void arm_cpu_dump_state(CPUState *cs, FILE *f, int flags)
-{
- ARMCPU *cpu = ARM_CPU(cs);
- CPUARMState *env = &cpu->env;
- int i;
-
- if (is_a64(env)) {
- aarch64_cpu_dump_state(cs, f, flags);
- return;
- }
You've lost this bit.
Somewhere there needs to be a check of the current cpu state, and one of the
two functions must be called.
@@ -823,6 +951,7 @@ static void aarch64_cpu_class_init(ObjectClass *oc, void
*data)
cc->gdb_num_core_regs = 34;
cc->gdb_core_xml_file = "aarch64-core.xml";
cc->gdb_arch_name = aarch64_gdb_arch_name;
+ cc->dump_state = aarch64_cpu_dump_state;
I suggest this continue to set arm_cpu_dump_state, like so,
static void arm_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
if (is_a64(env)) {
aarch64_cpu_dump_state(cs, f, flags);
} else {
aarch32_cpu_dump_state(cs, f, flags);
}
}
r~