aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/i386-tdep.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8cd42a..c12e907 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,6 +1,12 @@
2013-12-19 H.J. Lu <hongjiu.lu@intel.com>
PR gdb/16304
+ * i386-tdep.c (i386_record_lea_modrm_addr): Zero-extend 32-bit
+ address to 64-bit in 64-bit mode.
+
+2013-12-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gdb/16304
* amd64-linux-tdep.c (amd64_canonicalize_syscall): Handle x32
system calls.
(amd64_x32_linux_record_tdep): New.
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index f876675..ff37851 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -4282,6 +4282,13 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr)
else
*addr = (uint32_t) (*addr + (offset64 << scale));
}
+
+ if (!irp->aflag)
+ {
+ /* Since we are in 64-bit mode with ADDR32 prefix, zero-extend
+ address from 32-bit to 64-bit. */
+ *addr = (uint32_t) *addr;
+ }
}
else
{