]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/loongarch/gdbstub: Fix gdbstub incorrectly handling some registers
authorBibo Mao <maobibo@loongson.cn>
Tue, 18 Feb 2025 03:20:27 +0000 (11:20 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 18 Mar 2025 06:02:47 +0000 (09:02 +0300)
commit7f667fc7fe0ee5f6ac21ea3434d27b5b9582298b
tree71cdb9413978c66281863e0cda46d77480b87c73
parentdc203a598765b11bd667ae925c2953443f7a60ee
target/loongarch/gdbstub: Fix gdbstub incorrectly handling some registers

Write operation with R32 (orig_a0) and R34 (CSR_BADV) is discarded on
gdbstub implementation for LoongArch system. And return value should
be register size rather than 0, since it is used to calculate offset of
next register such as R33 (PC) in function handle_write_all_regs().

Cc: qemu-stable@nongnu.org
Fixes: ca61e75071c6 ("target/loongarch: Add gdb support.")
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
(cherry picked from commit 7bd4eaa847fcdbc4505d9ab95dafa21791d8302a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/loongarch/gdbstub.c