target/loongarch: Fix GDB get the wrong pc
commit1fe8ac3511fc771376019c6bfe77f317c5e56cd6
authorSong Gao <gaosong@loongson.cn>
Fri, 5 Aug 2022 03:35:19 +0000 (5 11:35 +0800)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 5 Aug 2022 17:02:40 +0000 (5 10:02 -0700)
tree11b25f90bc015ee0ad35137c8ff3a3aea7c115d0
parent4cbadc40b99801488bf8d5153d56ae751af15ab9
target/loongarch: Fix GDB get the wrong pc

GDB LoongArch add a register orig_a0, see the base64.xml [1].
We should add the orig_a0 to match the upstream GDB.

[1]: https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220805033523.1416837-2-gaosong@loongson.cn>
gdb-xml/loongarch-base64.xml
target/loongarch/cpu.c
target/loongarch/gdbstub.c