Re: RFA/ARM: Switch mode when setting PC

Daniel Jacobowitz
2004-01-17T18:54:38Z

On Sat, Jan 17, 2004 at 11:12:45AM -0500, Andrew Cagney wrote:
>
> >>If there's an explicit "set_resume_address", separate to write_pc, this
> >>should happen:
> >>
> >> (gdb) set $r15 = 0x123
> >> - target sees:
> >> $r15=0x123
> >> (gdb) call foo() OR (gdb) jump foo
> >> - target, via "set_resume_address", sees:
> >> $r15=&foo
> >> $ps&|=<magic-bits>
> >>
> >>and significantly no other write_pc calls.
> >
> >
> >And at this point, is write_pc used for anything besides
> >DECR_PC_AFTER_BREAK?
>
> Hopefully not (well ignoring -tdep files).

That's my thought too.

> > I would prefer to add an adjust_pc_after_break,
> >and then possibly rename the existing write_pc. Most of the write_pc
> >implementations we have currently are really set-resume-address
> >semantics.
>
> The change wouldn't be tested, and would be more work.

What wouldn't be tested? I have this handy DECR_PC_AFTER_BREAK target
machine to test on... in fact, I have access to m68k, alpha, s390,
i386, and a d10v simulator. Definitely more work, though.

I've now begun work on the cleanup of DECR_PC_AFTER_BREAK in a local
tree. More to follow. It's going to require painful testing...

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer