This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA/ARM: Switch mode when setting PC
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Sat, 17 Jan 2004 10:49:19 +0000
- Subject: Re: RFA/ARM: Switch mode when setting PC
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> On Fri, Jan 16, 2004 at 02:12:18PM -0500, Andrew Cagney wrote:
> > Or a lack of design, Arm needs to ensure that it doesn't define PC_REGNUM.
>
> OK, I'll keep that in mind.
>
> > >In the past we've tried to distinguish R15 from PC. This was especially
> > >useful in the legacy 26-bit mode where the CPSR bits *were* in R15.
>
> Perhaps, in that case, we should have the PC as a pseudoregister. That
> would simplify a lot of arm-tdep.c.
That was my feeling too.
> Is it possible to use the existing
> ARM compiler and simulator (and newlib) in 26-bit mode without a lot of
> hassle, or would it be the work of months to make it happen? I'm
> reluctant to dig my fingers in too deeply if I can't test both code
> paths.
It should be possible. At least, it used to be possible. In GDB you
should be able to do
set arm apcs32 off
and then you should get the debugger to think it is talking to a 26-bit
mode host. I doubt the code has been tested much recently.
In fact, I want to deprecate support for compiling 26-bit mode code in gcc
fairly soon -- but that isn't quite the same thing as deprecating 26-bit
mode execution; a processor running in 26-bit mode can generally run
apcs32 code as long as certain rare sequences are avoided.
R.