[AArch64] Return the regnum for PC (32) on aarch64
authorYichao Yu <yyc1992@gmail.com>
Wed, 18 May 2022 14:00:00 +0000 (15:00 +0100)
committerLuis Machado <luis.machado@arm.com>
Wed, 18 May 2022 14:42:23 +0000 (15:42 +0100)
commit1fe8486103e482bcd6cd74fdbf79a7d2ab9b111f
tree7242486ba0048cfea539d7428c362844f6e5be3e
parent4bb8b8e9381bce9734454470ebd1572534e7514e
[AArch64] Return the regnum for PC (32) on aarch64

This will allow the unwind info to explicitly specify a different value
for the return address from the link register.
Such usage, although uncommon, is valid and useful for signal frames.
It is also supported by aadwarf64 from ARM (Note 9 in [1]).

Ref https://sourceware.org/pipermail/gdb/2022-May/050091.html

[1] https://github.com/ARM-software/abi-aa/blob/2022Q1/aadwarf64/aadwarf64.rst#dwarf-register-names

Signed-off-by: Luis Machado <luis.machado@arm.com>
gdb/aarch64-tdep.c
gdb/aarch64-tdep.h
gdb/testsuite/gdb.arch/aarch64-unwind-pc.S [new file with mode: 0644]
gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp [new file with mode: 0644]