aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opcodes/ChangeLog14
-rw-r--r--opcodes/dis-buf.c18
-rw-r--r--opcodes/i386-dis.c11
3 files changed, 40 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index be6520d..dbeeea0 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,17 @@
+Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * dis-buf.c, i386-dis.c: Include <string.h>.
+
+Mon Feb 7 19:22:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in (bfd_powerpc_arch): Use ppc-dis.o and ppc-opc.o.
+
+ * ppc-opc.c (powerpc_opcodes): Mark POWER instructions supported
+ by Motorola PowerPC 601 with PPC_OPCODE_601.
+ * ppc-dis.c (print_insn_big_powerpc, print_insn_little_powerpc):
+ Disassemble Motorola PowerPC 601 instructions as well as normal
+ PowerPC instructions.
+
Sun Feb 6 07:45:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* i960-dis.c (reg, mem): Just use a static array instead of
diff --git a/opcodes/dis-buf.c b/opcodes/dis-buf.c
index 279aa24..c46dad3 100644
--- a/opcodes/dis-buf.c
+++ b/opcodes/dis-buf.c
@@ -1,5 +1,5 @@
/* Disassemble from a buffer, for GNU.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "dis-asm.h"
+#include <string.h>
#include <errno.h>
/* Get LENGTH bytes from info's buffer, at target address memaddr.
@@ -52,3 +53,18 @@ perror_memory (status, memaddr, info)
(*info->fprintf_func) (info->stream,
"Address 0x%x is out of bounds.\n", memaddr);
}
+
+/* This could be in a separate file, to save miniscule amounts of space
+ in statically linked executables. */
+
+/* Just print the address is hex. This is included for completeness even
+ though both GDB and objdump provide their own (to print symbolic
+ addresses). */
+
+void
+generic_print_address (addr, info)
+ bfd_vma addr;
+ struct disassemble_info *info;
+{
+ (*info->fprintf_func) (info->stream, "0x%x", addr);
+}
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index b5d5c7d..3be5ac7 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1,5 +1,5 @@
/* Print i386 instructions for GDB, the GNU debugger.
- Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1989, 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB.
@@ -33,6 +33,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
*/
#include "dis-asm.h"
+#include <string.h>
#define MAXLEN 20
@@ -1045,11 +1046,17 @@ print_insn_i386 (pc, info)
else
dp = &dis386[*codep];
codep++;
+
+ /* Fetch the mod/reg/rm byte. FIXME: We should be only fetching
+ this if we need it. As it is, this code loses if there is a
+ one-byte instruction (without a mod/reg/rm byte) at the end of
+ the address space. */
+
FETCH_DATA (info, codep + 1);
mod = (*codep >> 6) & 3;
reg = (*codep >> 3) & 7;
rm = *codep & 7;
-
+
if (dp->name == NULL && dp->bytemode1 == FLOATCODE)
{
dofloat ();