From e28a332c04863887b841fdd1a9042f78ea7a8264 Mon Sep 17 00:00:00 2001 From: Jerome Guitton Date: Mon, 29 Sep 2003 13:27:39 +0000 Subject: 2003-09-29 Jerome Guitton * arm-tdep.c (arm_make_prologue_cache): Use trad_frame_addr_p to test if the register has been saved on the stack. (arm_scan_prologue_cache): When analysing the instruction "str lr, [sp, #-4]", save the address where lr has been stored. --- gdb/ChangeLog | 7 +++++++ gdb/arm-tdep.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e20eab2..2a6205c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2003-09-29 Jerome Guitton + + * arm-tdep.c (arm_make_prologue_cache): Use trad_frame_addr_p to + test if the register has been saved on the stack. + (arm_scan_prologue_cache): When analysing the instruction + "str lr, [sp, #-4]", save the address where lr has been stored. + 2003-09-28 Andrew Cagney * frame.c (frame_read_unsigned_register): Delete function. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 85e8258..102c4ba 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -845,7 +845,8 @@ arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cac } else if (insn == 0xe52de004) /* str lr, [sp, #-4]! */ { - /* Function is frameless: extra_info defaults OK? */ + sp_offset -= 4; + cache->saved_regs[ARM_LR_REGNUM].addr = sp_offset; continue; } else if ((insn & 0xffff0000) == 0xe92d0000) @@ -967,7 +968,7 @@ arm_make_prologue_cache (struct frame_info *next_frame) /* Calculate actual addresses of saved registers using offsets determined by arm_scan_prologue. */ for (reg = 0; reg < NUM_REGS; reg++) - if (cache->saved_regs[reg].addr != 0) + if (trad_frame_addr_p (cache->saved_regs, reg)) cache->saved_regs[reg].addr += cache->prev_sp; return cache; -- cgit v1.1