Fix ARM machine state testcase failures
authorLuis Machado <lgustavo@codesourcery.com>
Mon, 27 Oct 2014 10:57:58 +0000 (08:57 -0200)
committerLuis Machado <lgustavo@codesourcery.com>
Mon, 27 Oct 2014 10:57:58 +0000 (08:57 -0200)
commit71e396f920e593494b8d57114d32e2c07f823781
treebc46247263a47ef0014c8d0344093fc32306f6c7
parent3aee438bbb1634e6e6e3ae60fe8479ae7172b014
Fix ARM machine state testcase failures

When running GDB's reverse debugging testsuite against a few ARM
multilibs, i noticed failures in the machinestate* testcases.

Further investigation showed that push and pop instruction encodings
A1 and A2 were not being handled properly, thus we missed saving
important contents from registers and memory. When going backwards,
such contents were not restored and thus we ended up with a corrupted
state that did not correspond to the real values we had at a
particular point in time.

Attached is a patch that fixes around 36 failures for both
gdb.reverse/machinestate.exp and
gdb.reverse/machinestate-precsave.exp testcases, making them fully
pass. This is for both armv7 and armv4. I still see failures for
armv4 thumb though, so it needs a bit more investigation.

I see no regressions due to this patch for armv7, armv7 thumb, armv4
and armv4 thumb.

gdb/ChangeLog:

* arm-tdep.c (INSN_S_L_BIT_NUM): Document.
(arm_record_ld_st_imm_offset): Reimplement to cover all
load/store cases for ARM opcode 010.
(arm_record_ld_st_multiple): Reimplement to cover all
load/store cases for ARM opcode 100.
gdb/ChangeLog
gdb/arm-tdep.c
This page took 0.025501 seconds and 4 git commands to generate.