projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch the inferior too in switch_to_program_space_and_thread
[deliverable/binutils-gdb.git]
/
opcodes
/
dis-buf.c
diff --git
a/opcodes/dis-buf.c
b/opcodes/dis-buf.c
index 6a3177248301353e36ac201317255210726d9172..19e3a6a0f7c69afb98d3fc1e98d3d614f94fadfc 100644
(file)
--- a/
opcodes/dis-buf.c
+++ b/
opcodes/dis-buf.c
@@
-1,6
+1,5
@@
/* Disassemble from a buffer, for GNU.
/* Disassemble from a buffer, for GNU.
- Copyright 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005,
- 2007 Free Software Foundation, Inc.
+ Copyright (C) 1993-2020 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This file is part of the GNU opcodes library.
@@
-33,12
+32,15
@@
buffer_read_memory (bfd_vma memaddr,
struct disassemble_info *info)
{
unsigned int opb = info->octets_per_byte;
struct disassemble_info *info)
{
unsigned int opb = info->octets_per_byte;
-
unsigned in
t end_addr_offset = length / opb;
- unsigned int max_addr_offset = info->buffer_length / opb;
-
unsigned in
t octets = (memaddr - info->buffer_vma) * opb;
+
size_
t end_addr_offset = length / opb;
+ size_t max_addr_offset = info->buffer_length / opb;
+
size_
t octets = (memaddr - info->buffer_vma) * opb;
if (memaddr < info->buffer_vma
if (memaddr < info->buffer_vma
- || memaddr - info->buffer_vma + end_addr_offset > max_addr_offset)
+ || memaddr - info->buffer_vma > max_addr_offset
+ || memaddr - info->buffer_vma + end_addr_offset > max_addr_offset
+ || (info->stop_vma && (memaddr >= info->stop_vma
+ || memaddr + end_addr_offset > info->stop_vma)))
/* Out of bounds. Use EIO because GDB uses it. */
return EIO;
memcpy (myaddr, info->buffer + octets, length);
/* Out of bounds. Use EIO because GDB uses it. */
return EIO;
memcpy (myaddr, info->buffer + octets, length);
This page took
0.027272 seconds
and
4
git commands to generate.