Use code cache in arm prologue analyzer
authorYao Qi <yao.qi@linaro.org>
Fri, 9 Dec 2016 09:51:20 +0000 (09:51 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 9 Dec 2016 09:51:20 +0000 (09:51 +0000)
commit198cd59d289209ad63cdd6da45e02a1c12b423a7
tree3189baddf1d035a9cc1f488fcb6b8fb16a72bba6
parent364ca42e71dfdce3f34e97ef028f7e3d5b5d880e
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.
gdb/ChangeLog
gdb/arm-tdep.c