Tue Dec 15 10:05:56 1992 Ian Lance Taylor (ian@cygnus.com)
[deliverable/binutils-gdb.git] / gdb / mips-pinsn.c
index 6dc3e553755fb8d0255621ec4cc79a3e5101ca5b..ca0e825dfea549a0fe8dcfb9340135ac1fa7d46a 100644 (file)
@@ -1,6 +1,6 @@
 /* Print mips instructions for GDB, the GNU debugger.
-   Copyright (C) 1989 Free Software Foundation, Inc.
-   Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp)
+   Copyright 1989, 1991, 1992 Free Software Foundation, Inc.
+   Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp).
 
 This file is part of GDB.
 
@@ -18,12 +18,9 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
-
 #include "defs.h"
-#include "param.h"
 #include "symtab.h"
-#include "mips-opcode.h"
+#include "opcode/mips.h"
 
 /* Mips instructions are never longer than this many bytes.  */
 #define MAXLEN 4
@@ -32,9 +29,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define NOPCODES (sizeof mips_opcodes / sizeof mips_opcodes[0])
 
 #define MKLONG(p)  *(unsigned long*)p
-
-extern char *reg_names[];
-
 \f
 /* subroutine */
 static unsigned char *
@@ -85,6 +79,10 @@ print_insn_arg (d, l, stream, pc)
       fprintf (stream, "0x%x", ((struct op_r_fmt *) l)->shamt);
       break;
 
+    case 'B':
+      fprintf (stream, "0x%x", ((struct op_brk_fmt *) l)->code);
+      break;
+
     case 'S':
       fprintf (stream, "$f%d", ((struct fop_r_fmt *) l)->fs);
       break;
@@ -118,6 +116,7 @@ print_insn (memaddr, stream)
   unsigned long int l;
 
   read_memory (memaddr, buffer, MAXLEN);
+  SWAP_TARGET_AND_HOST (buffer, MAXLEN);
 
   for (i = 0; i < NOPCODES; i++)
     {
This page took 0.024291 seconds and 4 git commands to generate.