projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent address violation problem when disassembling corrupt aarch64 binary.
[deliverable/binutils-gdb.git]
/
opcodes
/
m10200-dis.c
diff --git
a/opcodes/m10200-dis.c
b/opcodes/m10200-dis.c
index 6c69c0016ce61d4b02e7e91ba044773f5fe39a1d..96e13a8462814a3a532b41293a3725ca7312ea7d 100644
(file)
--- a/
opcodes/m10200-dis.c
+++ b/
opcodes/m10200-dis.c
@@
-1,5
+1,5
@@
/* Disassemble MN10200 instructions.
/* Disassemble MN10200 instructions.
- Copyright
1996, 1997, 1998, 2000, 2005, 200
7 Free Software Foundation, Inc.
+ Copyright
(C) 1996-201
7 Free Software Foundation, Inc.
This file is part of the GNU opcodes library.
This file is part of the GNU opcodes library.
@@
-18,11
+18,10
@@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include <stdio.h>
-
#include "sysdep.h"
#include "sysdep.h"
-#include "opcode/mn10200.h"
-#include "dis-asm.h"
+#include <stdio.h>
+#include "opcode/mn10200.h"
+#include "disassemble.h"
#include "opintl.h"
static void
#include "opintl.h"
static void
@@
-55,7
+54,7
@@
disassemble (bfd_vma memaddr,
mysize = 5;
else
abort ();
mysize = 5;
else
abort ();
-
+
if (op->format == FMT_2 || op->format == FMT_5)
extra_shift = 8;
else if (op->format == FMT_3
if (op->format == FMT_2 || op->format == FMT_5)
extra_shift = 8;
else if (op->format == FMT_3
@@
-71,7
+70,7
@@
disassemble (bfd_vma memaddr,
const unsigned char *opindex_ptr;
unsigned int nocomma;
int paren = 0;
const unsigned char *opindex_ptr;
unsigned int nocomma;
int paren = 0;
-
+
match = 1;
(*info->fprintf_func) (info->stream, "%s\t", op->name);
match = 1;
(*info->fprintf_func) (info->stream, "%s\t", op->name);
@@
-105,7
+104,7
@@
disassemble (bfd_vma memaddr,
(*info->fprintf_func) (info->stream, ",");
nocomma = 0;
(*info->fprintf_func) (info->stream, ",");
nocomma = 0;
-
+
if ((operand->flags & MN10200_OPERAND_DREG) != 0)
{
value = ((insn >> (operand->shift + extra_shift))
if ((operand->flags & MN10200_OPERAND_DREG) != 0)
{
value = ((insn >> (operand->shift + extra_shift))
@@
-145,7
+144,7
@@
disassemble (bfd_vma memaddr,
else if ((operand->flags & MN10200_OPERAND_MEMADDR) != 0)
(*info->print_address_func) (value, info);
else if ((operand->flags & MN10200_OPERAND_MEMADDR) != 0)
(*info->print_address_func) (value, info);
- else
+ else
(*info->fprintf_func) (info->stream, "%ld", value);
}
/* All done. */
(*info->fprintf_func) (info->stream, "%ld", value);
}
/* All done. */
@@
-158,7
+157,7
@@
disassemble (bfd_vma memaddr,
(*info->fprintf_func) (info->stream, _("unknown\t0x%04lx"), insn);
}
(*info->fprintf_func) (info->stream, _("unknown\t0x%04lx"), insn);
}
-int
+int
print_insn_mn10200 (bfd_vma memaddr, struct disassemble_info *info)
{
int status;
print_insn_mn10200 (bfd_vma memaddr, struct disassemble_info *info)
{
int status;
This page took
0.023741 seconds
and
4
git commands to generate.