Refactor arm_stack_frame_destroyed_p
authorYao Qi <yao.qi@linaro.org>
Wed, 30 Mar 2016 15:44:24 +0000 (16:44 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 30 Mar 2016 15:44:24 +0000 (16:44 +0100)
commitc58b006a7e886f55224901eb5a9d1d619e34c05f
treea2536f594581d1221739b7ba63cec545fa3c9434
parente6359af3fdda6b9265565ecbd213763244ed8594
Refactor arm_stack_frame_destroyed_p

This patch is to refactor arm_stack_frame_destroyed_p, so that the code
can be used in both arm_stack_frame_destroyed_p and arm epilogue
unwinder I am going to add in the next patch.  In fact, the code
is the same in two places, but checking whether it is thumb mode
is slightly different.  arm_stack_frame_destroyed_p uses
arm_pc_is_thumb, and epilogue unwinder should use arm_frame_is_thumb.

gdb:

2016-03-30  Yao Qi  <yao.qi@linaro.org>

* arm-tdep.c (arm_stack_frame_destroyed_p): Rename it ...
(arm_stack_frame_destroyed_p_1): ... here.  Don't call
arm_pc_is_thumb.
(arm_stack_frame_destroyed_p): Call
thumb_stack_frame_destroyed_p and
arm_stack_frame_destroyed_p_1.
gdb/ChangeLog
gdb/arm-tdep.c