* [rfa] Store the CPSR on ARM Linux
@ 2005-03-25 21:48 Daniel Jacobowitz
2005-03-29 15:49 ` Richard Earnshaw
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-03-25 21:48 UTC (permalink / raw)
To: gdb-patches; +Cc: Richard Earnshaw
I noticed when testing Thumb support that calling functions from the
opposite execution mode didn't work very well. Nothing ever caused GDB
to flush the changed CPSR to the inferior, so we would begin executing ARM
functions in Thumb mode or vice versa.
Committed to csl-arm-20050325-branch. OK for HEAD?
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-03-25 Daniel Jacobowitz <dan@codesourcery.com>
* arm-linux-nat.c (store_register, store_regs): Handle
ARM_PS_REGNUM.
Index: gdb/arm-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-linux-nat.c,v
retrieving revision 1.22
diff -u -p -r1.22 arm-linux-nat.c
--- gdb/arm-linux-nat.c 5 Jan 2005 15:43:43 -0000 1.22
+++ gdb/arm-linux-nat.c 25 Mar 2005 21:45:05 -0000
@@ -492,6 +492,12 @@ store_register (int regno)
if (regno >= ARM_A1_REGNUM && regno <= ARM_PC_REGNUM)
regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]);
+ else if (arm_apcs_32 && regno == ARM_PS_REGNUM)
+ regcache_raw_collect (current_regcache, regno,
+ (char *) ®s[ARM_CPSR_REGNUM]);
+ else if (!arm_apcs_32 && regno == ARM_PS_REGNUM)
+ regcache_raw_collect (current_regcache, ARM_PC_REGNUM,
+ (char *) ®s[ARM_PC_REGNUM]);
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
if (ret < 0)
@@ -524,6 +530,10 @@ store_regs (void)
regcache_raw_collect (current_regcache, regno, (char *) ®s[regno]);
}
+ if (arm_apcs_32 && register_cached (ARM_PS_REGNUM))
+ regcache_raw_collect (current_regcache, ARM_PS_REGNUM,
+ (char *) ®s[ARM_CPSR_REGNUM]);
+
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
if (ret < 0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa] Store the CPSR on ARM Linux
2005-03-25 21:48 [rfa] Store the CPSR on ARM Linux Daniel Jacobowitz
@ 2005-03-29 15:49 ` Richard Earnshaw
2005-03-29 16:58 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2005-03-29 15:49 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Fri, 2005-03-25 at 21:48, Daniel Jacobowitz wrote:
> I noticed when testing Thumb support that calling functions from the
> opposite execution mode didn't work very well. Nothing ever caused GDB
> to flush the changed CPSR to the inferior, so we would begin executing ARM
> functions in Thumb mode or vice versa.
>
> Committed to csl-arm-20050325-branch. OK for HEAD?
OK.
R.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa] Store the CPSR on ARM Linux
2005-03-29 15:49 ` Richard Earnshaw
@ 2005-03-29 16:58 ` Daniel Jacobowitz
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-03-29 16:58 UTC (permalink / raw)
To: gdb-patches
On Tue, Mar 29, 2005 at 04:49:17PM +0100, Richard Earnshaw wrote:
> On Fri, 2005-03-25 at 21:48, Daniel Jacobowitz wrote:
> > I noticed when testing Thumb support that calling functions from the
> > opposite execution mode didn't work very well. Nothing ever caused GDB
> > to flush the changed CPSR to the inferior, so we would begin executing ARM
> > functions in Thumb mode or vice versa.
> >
> > Committed to csl-arm-20050325-branch. OK for HEAD?
>
> OK.
Thanks, committed.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-29 16:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-25 21:48 [rfa] Store the CPSR on ARM Linux Daniel Jacobowitz
2005-03-29 15:49 ` Richard Earnshaw
2005-03-29 16:58 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox