gdb: LoongArch: Define register numbers and clean up code
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 25 Jun 2022 01:20:00 +0000 (09:20 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 25 Jun 2022 02:12:48 +0000 (10:12 +0800)
commit0757a50396e3638434f806aec2ee8c8f79a7026c
tree0ff0f17828e57b093d8503649d5205e0c91ddf04
parentc3467df4acf770ad6ed1a7c826843fee22396b38
gdb: LoongArch: Define register numbers and clean up code

This commit defines register numbers of various important registers,
we can use them directly in the related code, and also clean up some
code to make them more clear and readable.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
gdb/loongarch-linux-nat.c
gdb/loongarch-linux-tdep.c
gdb/loongarch-tdep.c
gdb/loongarch-tdep.h