aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-dis.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-04-23 09:32:59 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-04-23 09:32:59 -0700
commitc0f92bf9430546707f2154b8a2656974e5c7093c (patch)
treedde63748ac5b7de95638b8c85e8c72e6f96b926c /opcodes/i386-dis.c
parent0ca76ec3e5a987238d3d9932f5dc4dae9b3138ab (diff)
downloadgdb-c0f92bf9430546707f2154b8a2656974e5c7093c.zip
gdb-c0f92bf9430546707f2154b8a2656974e5c7093c.tar.gz
gdb-c0f92bf9430546707f2154b8a2656974e5c7093c.tar.bz2
Skip if size of bfd_vma is smaller than address size
Disassembler won't work properly when size of bfd_vma is smaller than address size. PR binutils/19983 PR binutils/19984 * i386-dis.c (print_insn): Return -1 if size of bfd_vma is smaller than address size.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r--opcodes/i386-dis.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index de0534c..560f75c 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -13327,6 +13327,13 @@ print_insn (bfd_vma pc, disassemble_info *info)
p++;
}
+ if (address_mode == mode_64bit && sizeof (bfd_vma) < 8)
+ {
+ (*info->fprintf_func) (info->stream,
+ _("64-bit address is disabled"));
+ return -1;
+ }
+
if (intel_syntax)
{
names64 = intel_names64;