This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa] Update PC without side effect in displaced stepping


On 12/20/2010 04:04 PM, Mark Kettenis wrote:
> 
> Sorry, no this isn't right.  On sparc and hppa for example, the
> effects of write_pc() are needed here, since both the pc and the "next
> pc" registers need to be updated to make sure all instructions in the
> copy area get executed.
> 

I know very little on sparc and hppa.  Thanks for your explanation.

> I think you'll have to make sure that if the displaced instructions
> are Thumb instructions, the copy area gets properly marked as Thumb
> such that write_pc() can do the right thing on arm as well.

That works.  If we do so, given an address of an instruction, we have to
return the mode of original instruction in displaced stepping, and
return real mode there otherwise.  However, current GDB dose not provide
interfaces to target-dependent parts to query the state of displaced
stepping.  Shall we refactor infrun.c a little bit to move some code to
displace_step.[c|h], and expose them to target-dependent part?

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]