* objfiles.c (allocate_objfile): Add the newly-created objfile to
[deliverable/binutils-gdb.git] / gdb / h8300-tdep.c
index 3bc5b36185d55f6040fcab85e47691872d77e8e7..11dfc5783ec7d8aa43cc9a1cf24744a69808c441 100644 (file)
@@ -26,7 +26,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "frame.h"
 #include "obstack.h"
 #include "symtab.h"
-#include <dis-asm.h>
+#include "dis-asm.h"
 #include "gdbcmd.h"
 #include "gdbtypes.h"
 
@@ -100,7 +100,7 @@ h8300_skip_prologue (start_pc)
 int
 print_insn (memaddr, stream)
      CORE_ADDR memaddr;
-     FILE *stream;
+     GDB_FILE *stream;
 {
   disassemble_info info;
   GDB_INIT_DISASSEMBLE_INFO(info, stream);
@@ -153,7 +153,7 @@ frame_find_saved_regs (fi, fsr)
       cache_fsr = (struct frame_saved_regs *)
        obstack_alloc (&frame_cache_obstack,
                       sizeof (struct frame_saved_regs));
-      bzero (cache_fsr, sizeof (struct frame_saved_regs));
+      memset (cache_fsr, '\0', sizeof (struct frame_saved_regs));
 
       fi->fsr = cache_fsr;
 
@@ -415,8 +415,8 @@ set_machine (args, from_tty)
      char *args;
      int from_tty;
 {
-  printf ("\"set machine\" must be followed by h8300 or h8300h.\n");
-  help_list (setmemorylist, "set memory ", -1, stdout);
+  printf_unfiltered ("\"set machine\" must be followed by h8300 or h8300h.\n");
+  help_list (setmemorylist, "set memory ", -1, gdb_stdout);
 }
 
 void
@@ -441,44 +441,42 @@ print_register_hook (regno)
   if (regno == 8)
     {
       /* CCR register */
-
       int C, Z, N, V;
-      unsigned char b[2];
+      unsigned char b[4];
       unsigned char l;
-
       read_relative_register_raw_bytes (regno, b);
-      l = b[1];
-      printf ("\t");
-      printf ("I-%d - ", (l & 0x80) != 0);
-      printf ("H-%d - ", (l & 0x20) != 0);
+      l = b[REGISTER_VIRTUAL_SIZE(8) -1];
+      printf_unfiltered ("\t");
+      printf_unfiltered ("I-%d - ", (l & 0x80) != 0);
+      printf_unfiltered ("H-%d - ", (l & 0x20) != 0);
       N = (l & 0x8) != 0;
       Z = (l & 0x4) != 0;
       V = (l & 0x2) != 0;
       C = (l & 0x1) != 0;
-      printf ("N-%d ", N);
-      printf ("Z-%d ", Z);
-      printf ("V-%d ", V);
-      printf ("C-%d ", C);
+      printf_unfiltered ("N-%d ", N);
+      printf_unfiltered ("Z-%d ", Z);
+      printf_unfiltered ("V-%d ", V);
+      printf_unfiltered ("C-%d ", C);
       if ((C | Z) == 0)
-       printf ("u> ");
+       printf_unfiltered ("u> ");
       if ((C | Z) == 1)
-       printf ("u<= ");
+       printf_unfiltered ("u<= ");
       if ((C == 0))
-       printf ("u>= ");
+       printf_unfiltered ("u>= ");
       if (C == 1)
-       printf ("u< ");
+       printf_unfiltered ("u< ");
       if (Z == 0)
-       printf ("!= ");
+       printf_unfiltered ("!= ");
       if (Z == 1)
-       printf ("== ");
+       printf_unfiltered ("== ");
       if ((N ^ V) == 0)
-       printf (">= ");
+       printf_unfiltered (">= ");
       if ((N ^ V) == 1)
-       printf ("< ");
+       printf_unfiltered ("< ");
       if ((Z | (N ^ V)) == 0)
-       printf ("> ");
+       printf_unfiltered ("> ");
       if ((Z | (N ^ V)) == 1)
-       printf ("<= ");
+       printf_unfiltered ("<= ");
     }
 }
 
This page took 0.025147 seconds and 4 git commands to generate.