diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-12-19 14:24:34 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-12-19 14:24:34 -0800 |
commit | 1e87984a63faf4378f6f71c407f7e969441b944e (patch) | |
tree | 0c2803edc84c3f21d8b6585f1cf8cf64de3bdd6b /gdb/i386-tdep.c | |
parent | e85596e021d0c4246a4ea21885c52e91583c463e (diff) | |
download | fsf-binutils-gdb-1e87984a63faf4378f6f71c407f7e969441b944e.zip fsf-binutils-gdb-1e87984a63faf4378f6f71c407f7e969441b944e.tar.gz fsf-binutils-gdb-1e87984a63faf4378f6f71c407f7e969441b944e.tar.bz2 |
Properly decode MODRM byte for 64-bit
64-bit mode doesn't use 16-bit address. We should always check SIB byte
for address in 64-bit mode.
PR gdb/16304
* i386-tdep.c (i386_record_lea_modrm_addr): Don't use 16-bit
address in 64-bit mode.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index ff37851..8992088 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -4209,9 +4209,9 @@ i386_record_lea_modrm_addr (struct i386_record_s *irp, uint64_t *addr) ULONGEST offset64; *addr = 0; - if (irp->aflag) + if (irp->aflag || irp->regmap[X86_RECORD_R8_REGNUM]) { - /* 32 bits */ + /* 32/64 bits */ int havesib = 0; uint8_t scale = 0; uint8_t byte; |