gdb: LoongArch: Support reg aliases in info reg command
authorHui Li <lihui@loongson.cn>
Thu, 16 Feb 2023 01:22:25 +0000 (09:22 +0800)
committerTiezhu Yang <yangtiezhu@loongson.cn>
Thu, 23 Feb 2023 12:36:02 +0000 (20:36 +0800)
commit0373a76af6b8ef949b9ca8aaa6325fbde0948603
tree8bc5d0033e074373253f924b2b2552f3a07a3d2a
parent9d7c73af4bf5f1d416a90ec5327279b6f1092a83
gdb: LoongArch: Support reg aliases in info reg command

According to LoongArch ELF ABI specification [1], support the register
aliases in "info register" command.

Without this patch:
```
(gdb) info reg a0
Invalid register `a0'

```
With this patch:

```
(gdb) info reg a0

a0             0x1                 1

```
[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_register_convention

Signed-off-by: Hui Li <lihui@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
gdb/loongarch-tdep.c