aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2013-06-26 15:37:49 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2013-06-26 15:37:49 +0000
commita2fb2cee96b4d248ff8e0f77990aabe0dea0ae25 (patch)
tree253a6e416d1b1d8af1c04113be472cf12b2ec7cb
parent86ebe1497f1fc9f5b7a4d56a9e5689f1fcf38882 (diff)
downloadgdb-a2fb2cee96b4d248ff8e0f77990aabe0dea0ae25.zip
gdb-a2fb2cee96b4d248ff8e0f77990aabe0dea0ae25.tar.gz
gdb-a2fb2cee96b4d248ff8e0f77990aabe0dea0ae25.tar.bz2
* mips-tdep.c (fetch_mips_16): Use unmake_compact_addr.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/mips-tdep.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0919016..0774a13 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2013-06-26 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * mips-tdep.c (fetch_mips_16): Use unmake_compact_addr.
+
2013-06-26 Dmitry Kozlov <ddk@codesourcery.com>
* tracepoint.c (trace_save): Extend tsave to save starttime, stoptime.
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 74f27bc..3993f92 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2042,7 +2042,8 @@ fetch_mips_16 (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte buf[8];
- pc &= 0xfffffffe; /* Clear the low order bit. */
+
+ pc = unmake_compact_addr (pc); /* Clear the low order bit. */
target_read_memory (pc, buf, 2);
return extract_unsigned_integer (buf, 2, byte_order);
}