aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:32:02 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-15 22:32:02 +0000
commitd2ca4222d5a14ae1a0bcc28fc7ce667baec76ff0 (patch)
tree1dc319c102d8e7d7f026d2a4ee22ae7006d10c06 /gdb/sh-tdep.c
parentc458d6db4beec11df86f11c63e69cb0e28cb1d40 (diff)
downloadgdb-d2ca4222d5a14ae1a0bcc28fc7ce667baec76ff0.zip
gdb-d2ca4222d5a14ae1a0bcc28fc7ce667baec76ff0.tar.gz
gdb-d2ca4222d5a14ae1a0bcc28fc7ce667baec76ff0.tar.bz2
* mips-tdep.c (mips16_scan_prologue): Replace read_next_frame_reg
by frame_unwind_register_signed calls. (mips32_scan_prologue): Likewise. Skip analysis of alloca stack frame allocations when called with NULL NEXT_FRAME parameter. (read_next_frame_reg): Remove. * sh-tdep.c (sh_analyze_prologue): Add FPSCR parameter. Use it instead of reading the FPSCR register. (sh_frame_cache): Pass unwound FPSCR register value to sh_analyze_prologue. (sh_skip_prologue): Pass dummy FPSCR value to sh_analyze_prologue. * v850-tdep.c (v850_analyze_prologue): Add CTBP parameter. Use it instead of reading the CTBP register. (v850_frame_cache): Pass unwound CTBP register value to v850_analyze_prologue.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 19f5a40..3e17c27 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -508,7 +508,7 @@ gdb_print_insn_sh (bfd_vma memaddr, disassemble_info * info)
static CORE_ADDR
sh_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
- struct sh_frame_cache *cache)
+ struct sh_frame_cache *cache, ULONGEST fpscr)
{
ULONGEST inst;
CORE_ADDR opc;
@@ -615,7 +615,7 @@ sh_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
}
else if (IS_FPUSH (inst))
{
- if (read_register (FPSCR_REGNUM) & FPSCR_SZ)
+ if (fpscr & FPSCR_SZ)
{
cache->sp_offset += 8;
}
@@ -728,7 +728,7 @@ sh_skip_prologue (CORE_ADDR start_pc)
return max (pc, start_pc);
cache.sp_offset = -4;
- pc = sh_analyze_prologue (start_pc, (CORE_ADDR) -1, &cache);
+ pc = sh_analyze_prologue (start_pc, (CORE_ADDR) -1, &cache, 0);
if (!cache.uses_fp)
return start_pc;
@@ -2360,7 +2360,11 @@ sh_frame_cache (struct frame_info *next_frame, void **this_cache)
cache->pc = frame_func_unwind (next_frame, NORMAL_FRAME);
current_pc = frame_pc_unwind (next_frame);
if (cache->pc != 0)
- sh_analyze_prologue (cache->pc, current_pc, cache);
+ {
+ ULONGEST fpscr;
+ fpscr = frame_unwind_register_unsigned (next_frame, FPSCR_REGNUM);
+ sh_analyze_prologue (cache->pc, current_pc, cache, fpscr);
+ }
if (!cache->uses_fp)
{