AArch64: Ensure regcache is reset between tests
authorAlan Hayward <alan.hayward@arm.com>
Wed, 10 Apr 2019 14:58:27 +0000 (15:58 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Thu, 11 Apr 2019 08:51:07 +0000 (09:51 +0100)
commit68811f8ff84895ef1cad37ac6947f1a340dd2ae2
tree11d0455129367a4550515a1ab977366e482e2606
parent795e3bb7de9ce2eb1ec3de3faf8f6bc925a58c9e
AArch64: Ensure regcache is reset between tests

A recent change made the AArch64 self tests resuse the saved regs
cache, rather than creating a new one.  Ensure it is reset to default
values between tests.

Do this by splitting the reset functionality from trad_frame_alloc_saved_regs
into a new function.

Fixes selftest on AArch64.

gdb/ChangeLog:

* aarch64-tdep.c (aarch64_analyze_prologue_test): Reset saved regs.
* trad-frame.c (trad_frame_reset_saved_regs): New function.
(trad_frame_alloc_saved_regs): Call trad_frame_reset_saved_regs.
* trad-frame.h (trad_frame_reset_saved_regs): New declaration.
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/trad-frame.c
gdb/trad-frame.h