[AArch64] Only access inferior registers when creating a frame cache
authorPierre Langlois <pierre.langlois@arm.com>
Thu, 9 Jul 2015 15:35:11 +0000 (16:35 +0100)
committerPierre Langlois <pierre.langlois@arm.com>
Thu, 9 Jul 2015 15:35:11 +0000 (16:35 +0100)
commitdb634143224dc7cb985d996bed15257f5cb86b25
tree8a61791a078521cfbbd8c57ed7640bb0768c3632
parent8b61f75db53877215c7cb15b901a094bf1fb916e
[AArch64] Only access inferior registers when creating a frame cache

This patch moves the address of the start of a function (func) and the
address from which it was called (prev_pc) into aarch64_prologue_cache.
The idea is to keep accesses to the inferior's registers into
aarch64_make_prologue_cache and aarch64_make_stub_cache.

gdb/ChangeLog:

* aarch64-tdep.c (aarch64_prologue_cache) <func, prev_pc>: New
fields.
(aarch64_scan_prologue): Set prev_pc.
(aarch64_make_prologue_cache): Set func.
(aarch64_make_stub_cache): Set prev_pc.
(aarch64_prologue_this_id): Remove local variables id, pc and
func.  Read prev_pc and func from cache.
(aarch64_stub_this_id): Read prev_pc from cache.
gdb/ChangeLog
gdb/aarch64-tdep.c