Hi Peter, >> diff --git a/gdbstub.c b/gdbstub.c >> index f1d5148..ffab30b 100644 >> --- a/gdbstub.c >> +++ b/gdbstub.c >> @@ -665,6 +665,9 @@ static const char *get_feature_xml(const char *p, const >> char **newp, >> pstrcat(target_xml, sizeof(target_xml), "<xi:include href=\""); >> pstrcat(target_xml, sizeof(target_xml), cc->gdb_core_xml_file); >> pstrcat(target_xml, sizeof(target_xml), "\"/>"); >> + if (cc->gdb_has_dynamic_xml) { >> + cc->register_gdb_regs_for_features(cpu); >> + } > I don't think we need a callback hook for this. You could just assume > the target code has already done whatever it needs. Specifically for > arm you can just make arm_cpu_register_gdb_regs_for_features() in helper.c > call gdb_register_coprocessor(..., "system-registers.xml",...) the > same way it already does for other xml files. I think in this case, for ARM64, if the execution mode has changed (to AARCH32) the time we connect to gdbstub then we will get the registers view of AARCH64 instead of AARCH32, as we have created our XML at the beginning (on arm_cpu_register_gdb_regs_for_feature()) where the CPU is on AARCH64.
Best regards, Abdallah