[try 3rd] arm_pc_is_thumb takes displaced stepping into account

Yao Qi yao@codesourcery.com
Thu Feb 10 06:42:00 GMT 2011


On 01/31/2011 11:38 PM, Ulrich Weigand wrote:
> What if the copy area contains more than a single instruction, and we
> need to find out the mode of the PC corresponding to the second of them?
> 

This approach can handle multiple instructions in copy area, because
during preparation of displaced stepping (in displaced_step_prepare),
regcache_write_pc is called to update PC to the *address of copy area*,
no matter how many instructions in copy area.

Per my limited knowledge on GDB, I can't find a case that PC is set
somewhere of copy area other than the beginning of copy area during
displaced stepping.  That is to say, we don't have to know the mode of
the 2nd instruction.

Actually, most of the time, copy area contains more than one
instructions, and test suite works well.  This can also prove that this
approach works.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list