RFC: Patch to arm-tdep.c -- Register flavors

Richard Earnshaw rearnsha@arm.com
Sat Apr 1 00:00:00 GMT 2000


> > And finally, the ps register name is wrong, especially in the A{T}PCS area
> > but also more generally; the name is "cpsr" in all ARM documentation (the
> > "ps" name comes from when the processor flags weren't really a separate
> > register -- they were in the unused parts of r15 -- so there was no name).
> 
> Richard is correct here, in arm-linux-nat.c, I initialize the PS register with
> the contents of CPSR if arm_apcs_32 is set, or with the contents of the PC if
> not.  Perhaps we should set the register name based on this information as well.


This is one of the few cases where I would just delete the old name.  Old 
processors never had a specific flags register, so the 'ps' name was 
'invented' by the original porter of gdb.  Since then the cpsr name has 
come into use and I doubt that even users debugging in 26-bit mode would 
object violently to this name changing (maybe we can support "ps" as an 
alias when parsing user input, but I see no point in ever printing 
anything other than "cpsr".

R.



More information about the Gdb-patches mailing list