Use code cache in arm prologue analyzer
This patch change arm prologue analyzer using code cache, in order
to improve the performance of remote debugging.
gdb.perf/skip-prologue.exp (measured by wall-time) is improved a lot,
Original Patched Original Patched
without dbg without dbg with dbg with dbg
-marm 14.
166741848 9.
32852292061 11.
4908499718 9.
16302204132
-marm 14.
6705040932 9.
34849786758 18.
2788009644 9.
14823913574
\-fstack-protector-all
-mthumb 34.
4391930103 10.
6062178612 13.
7886838913 10.
3094120026
-mthumb
\-fstack-protector-all 34.
9310460091 10.
6413481236 25.
3875930309 10.
6294929981
gdb:
2016-12-09 Yao Qi <yao.qi@linaro.org>
* arm-tdep.c (skip_prologue_function): Call
read_code_unsigned_integer instead of
read_memory_unsigned_integer.
(thumb_analyze_prologue): Likewise.
(arm_analyze_load_stack_chk_guard): Likewise.
(arm_skip_stack_protector): Likewise.
(arm_analyze_prologue):Likewise.
(extend_buffer_earlier): Call target_read_code instead
of target_read_memory.
(arm_adjust_breakpoint_address): Likewise.