This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [try 3rd] arm_pc_is_thumb takes displaced stepping into account
- From: Yao Qi <yao at codesourcery dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 10 Feb 2011 14:42:30 +0800
- Subject: Re: [try 3rd] arm_pc_is_thumb takes displaced stepping into account
- References: <201101311538.p0VFcwIn019533@d06av02.portsmouth.uk.ibm.com>
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 (éå)