Skip to content

Commit

Permalink
target/xtensa: fix gdbstub register counts
Browse files Browse the repository at this point in the history
This fixes communication with gdb in the presence of type-5 (TIE state
mapped on user registers) and type-7 (special case of masked registers)
registers in the xtensa core config.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
jcmvbkbc committed Aug 20, 2018
1 parent 0abaa41 commit 2becc8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion target/xtensa/helper.c
Expand Up @@ -100,7 +100,9 @@ void xtensa_finalize_config(XtensaConfig *config)
unsigned n_core_regs = 0;

for (i = 0; config->gdb_regmap.reg[i].targno >= 0; ++i) {
if (config->gdb_regmap.reg[i].type != 6) {
if (config->gdb_regmap.reg[i].type != 5 &&
config->gdb_regmap.reg[i].type != 6 &&
config->gdb_regmap.reg[i].type != 7) {
++n_regs;
if ((config->gdb_regmap.reg[i].flags & 0x1) == 0) {
++n_core_regs;
Expand Down

0 comments on commit 2becc8f

Please sign in to comment.