From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Blundell To: Ben Harris Cc: gdb@sources.redhat.com Subject: Re: PC and PSR on 26-bit ARM Date: Tue, 23 Oct 2001 01:35:00 -0000 Message-id: References: X-SW-Source: 2001-10/msg00225.html >I'm trying to make GDB work happily on NetBSD/arm26, which runs on ancient >ARM processors, where the PC and PSR share R15. As far as I can tell, the >code in arm-linux-nat.c, when fetching registers subprocess on a 26-bit >CPU, puts the PC in registers[PC_REGNUM], and the PC+PSR in >registers[PS_REGNUM]. When putting registers back into the process, it >sets R15 (PC+PSR) from registers[PC_REGNUM] and ignores >registers[PS_REGNUM]. I don't think the 26-bit support for arm-linux has ever really been tested, so you probably don't want to put too much faith in it. What you've described doesn't really sound like the right thing to me; the fetching side is OK, but when it writes registers back into the process I think it needs to combine registers[PC_REGNUM] and registers[PS_REGNUM] in order to get the correct R15 value. p.