aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2008-03-15 00:00:48 +0000
committerKevin Buettner <kevinb@redhat.com>2008-03-15 00:00:48 +0000
commit7d1e6fb8639f8b672daaa338744003b4b2595d37 (patch)
tree7339ba340e7cedc0b91d8030dfb01323168d2122
parente073c5fec65ef564a61960a43a1de80c091d3b1e (diff)
downloadgdb-7d1e6fb8639f8b672daaa338744003b4b2595d37.zip
gdb-7d1e6fb8639f8b672daaa338744003b4b2595d37.tar.gz
gdb-7d1e6fb8639f8b672daaa338744003b4b2595d37.tar.bz2
* mips-tdep.c (mips32_scan_prologue): Use the ABI register size
to decide whether to match instruction patterns using "sw" and "sd".
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index df08fba..1620d64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-14 Kevin Buettner <kevinb@redhat.com>
+
+ * mips-tdep.c (mips32_scan_prologue): Use the ABI register size
+ to decide whether to match instruction patterns using "sw" and "sd".
+
2008-03-14 Pedro Alves <pedro@codesourcery.com>
* infcmd.c (jump_command): Postpone disabling stdin until after
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 8b0290e..3722120 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1931,6 +1931,7 @@ mips32_scan_prologue (CORE_ADDR start_pc, CORE_ADDR limit_pc,
int seen_sp_adjust = 0;
int load_immediate_bytes = 0;
struct gdbarch *gdbarch = get_frame_arch (next_frame);
+ int regsize_is_64_bits = (mips_abi_regsize (gdbarch) == 8);
/* Can be called when there's no process, and hence when there's no
NEXT_FRAME. */
@@ -1973,11 +1974,13 @@ restart:
break;
seen_sp_adjust = 1;
}
- else if ((high_word & 0xFFE0) == 0xafa0) /* sw reg,offset($sp) */
+ else if (((high_word & 0xFFE0) == 0xafa0) /* sw reg,offset($sp) */
+ && !regsize_is_64_bits)
{
set_reg_offset (this_cache, reg, sp + low_word);
}
- else if ((high_word & 0xFFE0) == 0xffa0) /* sd reg,offset($sp) */
+ else if (((high_word & 0xFFE0) == 0xffa0) /* sd reg,offset($sp) */
+ && regsize_is_64_bits)
{
/* Irix 6.2 N32 ABI uses sd instructions for saving $gp and $ra. */
set_reg_offset (this_cache, reg, sp + low_word);
@@ -2041,7 +2044,8 @@ restart:
}
}
}
- else if ((high_word & 0xFFE0) == 0xafc0) /* sw reg,offset($30) */
+ else if ((high_word & 0xFFE0) == 0xafc0 /* sw reg,offset($30) */
+ && !regsize_is_64_bits)
{
set_reg_offset (this_cache, reg, frame_addr + low_word);
}