[PATCH] Fix ARM machine state testcase failures

Yao Qi yao@codesourcery.com
Fri Oct 17 08:39:00 GMT 2014


Luis Machado <lgustavo@codesourcery.com> writes:

> 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.

Luis,
I agree on your analysis, but I have a question to the code.  Do we
really need to handle PUSH and POP as a special case in LDR/STR
instructions?  AFAICS, PUSH/POP is just one kind of LDR/STR instruction
with post-indexed addressing.  Probably, we just need to tweak
arm_record_ld_st_imm_offset and arm_record_ld_st_multiple for
post-indexed addressing, at least LDR with post-indexed are not
handled in arm_record_ld_st_imm_offset.  What do you think?

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list