xtensa: don't send window registers to GDB

GDB considers window registers as pseudo registers, meaning that they
are calculated by GDB using the values of AR registers and windowbase.
This patch removes the window registers from the total number of
registers that QEMU will send to GDB, making the number of registers
match the one that GDB expects to see.
This commit is contained in:
Ivan Grokhotkov
2021-07-23 16:39:57 +02:00
parent f08bf1a417
commit 200797fb2f
+2 -1
View File
@@ -49,7 +49,8 @@ void xtensa_count_regs(const XtensaConfig *config,
for (i = 0; config->gdb_regmap.reg[i].targno >= 0; ++i) {
if (config->gdb_regmap.reg[i].type != xtRegisterTypeTieState &&
config->gdb_regmap.reg[i].type != xtRegisterTypeMapped &&
config->gdb_regmap.reg[i].type != xtRegisterTypeUnmapped) {
config->gdb_regmap.reg[i].type != xtRegisterTypeUnmapped &&
(config->gdb_regmap.reg[i].type != xtRegisterTypeWindow || count_window_regs)) {
++*n_regs;
if (count_core_regs) {
if ((config->gdb_regmap.reg[i].flags &