This is the mail archive of the gdb-patches@sources.redhat.com 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/ARM: Switch mode when setting PC


> 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.


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