summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-04-10 23:06:56 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-04-10 23:06:56 +0000
commit6eef21b44e41941b50896c15a68f51753ab8b21f (patch)
tree44b0503c7993a763c2ef71cc841761c417b6d833 /gdb
parent62383a0b28edf21925d503b780515f2f7461efba (diff)
downloadgdb-6eef21b44e41941b50896c15a68f51753ab8b21f.tar.gz
* mips-tdep.c (mips_skip_pic_trampoline_code): Correct sign
extension in jump target calculation.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1312b1eb892..83dfa086a05 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-04-10 Maciej W. Rozycki <macro@codesourcery.com>
+ * mips-tdep.c (mips_skip_pic_trampoline_code): Correct sign
+ extension in jump target calculation.
+
+2011-04-10 Maciej W. Rozycki <macro@codesourcery.com>
+
* mips-tdep.c (mips32_next_pc): Handle JALX.
2012-04-10 Yao Qi <yao@codesourcery.com>
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 7ec358387b3..7b0ca703c89 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5768,8 +5768,8 @@ mips_skip_pic_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
&& (stub_words[1] & 0xfc000000U) == 0x08000000
&& (stub_words[2] & 0xffff0000U) == 0x27390000
&& stub_words[3] == 0x00000000)
- return (((stub_words[0] & 0x0000ffff) << 16)
- + (stub_words[2] & 0x0000ffff));
+ return ((((stub_words[0] & 0x0000ffff) << 16)
+ + (stub_words[2] & 0x0000ffff)) ^ 0x8000) - 0x8000;
}
/* Not a recognized stub. */