diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-08-16 10:33:04 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-08-19 17:14:25 -0700 |
commit | 2becc8fd7e6cbb69015ab7a2cbd21bba5a5ffbb9 (patch) | |
tree | 8f5a740a159d7557bf83350bfa655e9d2c559d5f /target/xtensa/helper.c | |
parent | 0abaa41d936becd914a16ee1fe2a981d96d19428 (diff) | |
download | qemu-2becc8fd7e6cbb69015ab7a2cbd21bba5a5ffbb9.zip |
target/xtensa: fix gdbstub register counts
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>
Diffstat (limited to 'target/xtensa/helper.c')
-rw-r--r-- | target/xtensa/helper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index c9a6132700..efb3cef128 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -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; |