Match instruction adjusts SP in thumb
authorYao Qi <yao@codesourcery.com>
Wed, 2 Jul 2014 06:45:12 +0000 (14:45 +0800)
committerYao Qi <yao@codesourcery.com>
Fri, 11 Jul 2014 13:33:55 +0000 (21:33 +0800)
commit540314bdd87c7478d21b44dd4856d937bcc1479b
tree37fc171ec790695eab48bbfa47e1d6c4c7531545
parent1db01f22f58cc01768dc921a7443a1bad4e48eb5
Match instruction adjusts SP in thumb

This is a refactor patch, that moves matching instructions adjusting
SP into a new function, thumb_instruction_restores_sp.  The second
call to thumb_instruction_restores_sp in thumb_in_function_epilogue_p
is a little different from the original.  The original code matches
'POP <registers> without PC', but thumb_in_function_epilogue_p matches
'POP <registers> (with and without PC)'.  However, GDB found one
instruction about return and is scanning the previous instruction,
which should be an instruction about return too, so the code change
doesn't affect the functionality.

gdb:

2014-07-11  Yao Qi  <yao@codesourcery.com>

* arm-tdep.c (thumb_instruction_restores_sp): New function.
(thumb_in_function_epilogue_p): Call
thumb_instruction_restores_sp.
gdb/ChangeLog
gdb/arm-tdep.c