aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
committerStan Shebs <shebs@codesourcery.com>1999-04-26 18:34:20 +0000
commit7a292a7adf506b866905b06b3024c0fd411c4583 (patch)
tree5b208bb48269b8a82d5c3a5f19c87b45a62a22f4 /gdb/arm-tdep.c
parent1996fae84682e8ddd146215dd2959ad1ec924c09 (diff)
downloadgdb-7a292a7adf506b866905b06b3024c0fd411c4583.zip
gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.gz
gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.bz2
import gdb-19990422 snapshot
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 607dc8f..d6970a2 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1,5 +1,5 @@
-/* Target-dependent code for the Acorn Risc Machine, for GDB, the GNU Debugger.
- Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995, 1996, 1998, 1999
+/* Target-dependent code for the Acorn Risc Machine (ARM).
+ Copyright (C) 1988, 1989, 1991, 1992, 1993, 1995-1999
Free Software Foundation, Inc.
This file is part of GDB.
@@ -479,7 +479,7 @@ arm_scan_prologue (fi)
{
/* Get address of the stmfd in the prologue of the callee; the saved
PC is the address of the stmfd + 12. */
- prologue_start = (read_memory_integer (fi->frame, 4) & 0x03fffffc) - 12;
+ prologue_start = ADDR_BITS_REMOVE(read_memory_integer (fi->frame, 4)) - 12;
prologue_end = prologue_start + 40; /* FIXME: should be big enough */
}
@@ -974,14 +974,16 @@ arm_pop_frame ()
{
struct frame_info *frame = get_current_frame();
int regnum;
+ CORE_ADDR old_SP;
+ old_SP = read_register (frame->framereg);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (frame->fsr.regs[regnum] != 0)
write_register (regnum,
read_memory_integer (frame->fsr.regs[regnum], 4));
write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
- write_register (SP_REGNUM, read_register (frame->framereg));
+ write_register (SP_REGNUM, old_SP);
flush_cached_frames ();
}