This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Move encoded as 'or' in binutils.
- From: Joel Brobecker <brobecke at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 28 Oct 2015 16:54:54 -0000
- Subject: [binutils-gdb] Move encoded as 'or' in binutils.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=93084fcd9b85e9f982b75f63f366081f5fe8e2d8
commit 93084fcd9b85e9f982b75f63f366081f5fe8e2d8
Author: Simon Dardis <Simon.Dardis@imgtec.com>
Date: Wed Oct 28 09:52:17 2015 -0700
Move encoded as 'or' in binutils.
A patch (http://sourceware.org/ml/binutils/2015-07/msg00376.html)
submitted to binutils will be encoding move as an 'or' instruction over
[d]addu in assembly and various code stubs. This patch for gdb addresses
that change for the mips specific parts of gdb.
gdb/ChangeLog:
* mips-linux-tdep.c (mips_linux_in_dynsym_stub): Recognise 'or'
as move along with [d]addu.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/mips-linux-tdep.c | 10 ++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 181991a..7209666 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-28 Simon Dardis <Simon.Dardis@imgtec.com>
+
+ * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Recognise 'or'
+ as move along with [d]addu.
+
2015-10-28 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_software_single_step): Pass 1 to
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index f7eaf34..b29073b 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -739,15 +739,17 @@ mips_linux_in_dynsym_stub (CORE_ADDR pc)
insn = extract_unsigned_integer (p + 4, 4, byte_order);
if (n64)
{
- /* daddu t7,ra */
- if (insn != 0x03e0782d)
+ /* 'daddu t7,ra' or 'or t7, ra, zero'*/
+ if (insn != 0x03e0782d || insn != 0x03e07825)
return 0;
+
}
else
{
- /* addu t7,ra */
- if (insn != 0x03e07821)
+ /* 'addu t7,ra' or 'or t7, ra, zero'*/
+ if (insn != 0x03e07821 || insn != 0x03e07825)
return 0;
+
}
insn = extract_unsigned_integer (p + 8, 4, byte_order);