Fix arm process record for some instructions
authorYao Qi <yao.qi@linaro.org>
Thu, 16 Mar 2017 16:35:18 +0000 (16:35 +0000)
committerYao Qi <yao.qi@linaro.org>
Thu, 16 Mar 2017 16:35:18 +0000 (16:35 +0000)
commitb121eeb9971ebfceffc38e6131fdc15ec4188599
tree39b68bf47f5de3905bdcaf8ef4d1d5112674fdf1
parent728a79135f51a1c20719ebaf3c98446d9ee248db
Fix arm process record for some instructions

I look at some fails in gdb.reverse/solib-precsave.exp in -mthumb,
they are caused by some bugs on decoding these three instructions,
uxtb, ldr and mrc.  This patch adds unit tests against these three
instructions, and fix these bugs by re-organizing the code to match
the table in ARM ARM.

gdb:

2017-03-16  Yao Qi  <yao.qi@linaro.org>

* arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
(arm_record_test): Declare.
(_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
(thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
align with the manual.
(thumb_record_misc): Adjust the code order to align with the
manual.
(thumb2_record_decode_insn_handler): Fix instruction matching.
(instruction_reader_thumb): New class.
(arm_record_test): New function.
gdb/ChangeLog
gdb/arm-tdep.c