Search
lxdream.org :: lxdream/src/x86dasm/dis-buf.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/x86dasm/dis-buf.c
changeset 1092:7c4ffe27e7b5
prev755:ab873907b00e
author nkeynes
date Sun Dec 20 21:01:03 2009 +1000 (10 years ago)
permissions -rw-r--r--
last change Fix 64-bit x86 disassembly
Add crash-report hook to SIGILL and SIGBUS
file annotate diff log raw
1.1 --- a/src/x86dasm/dis-buf.c Mon Jul 21 00:08:34 2008 +0000
1.2 +++ b/src/x86dasm/dis-buf.c Sun Dec 20 21:01:03 2009 +1000
1.3 @@ -31,14 +31,8 @@
1.4 struct disassemble_info *info;
1.5 {
1.6 unsigned int opb = info->octets_per_byte;
1.7 - unsigned int end_addr_offset = length / opb;
1.8 - unsigned int max_addr_offset = info->buffer_length / opb;
1.9 - unsigned int octets = (memaddr - info->buffer_vma) * opb;
1.10 + uintptr_t octets = memaddr * opb;
1.11
1.12 - if (memaddr < info->buffer_vma
1.13 - || memaddr - info->buffer_vma + end_addr_offset > max_addr_offset)
1.14 - /* Out of bounds. Use EIO because GDB uses it. */
1.15 - return EIO;
1.16 memcpy (myaddr, info->buffer + octets, length);
1.17
1.18 return 0;
.