Fix build on OpenBSD/sparc64.
[deliverable/binutils-gdb.git] / gdb / sh64-tdep.c
index e9ce42bef9d482cf6815578264bbc50b3a428cd6..262de84cf99a53bd3d606a65c403866760fd31e4 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Renesas Super-H, for GDB.
 
-   Copyright (C) 1993-2013 Free Software Foundation, Inc.
+   Copyright (C) 1993-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,7 +32,7 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "arch-utils.h"
 #include "regcache.h"
@@ -1948,14 +1948,10 @@ sh64_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file,
     fprintf_filtered (file, "%-10.9g", flt);
 
   /* Print the fp register as hex.  */
-  fprintf_filtered (file, "\t(raw 0x");
-  for (j = 0; j < register_size (gdbarch, regnum); j++)
-    {
-      int idx = gdbarch_byte_order (gdbarch)
-               == BFD_ENDIAN_BIG ? j : register_size
-               (gdbarch, regnum) - 1 - j;
-      fprintf_filtered (file, "%02x", raw_buffer[idx]);
-    }
+  fprintf_filtered (file, "\t(raw ");
+  print_hex_chars (file, raw_buffer,
+                  register_size (gdbarch, regnum),
+                  gdbarch_byte_order (gdbarch));
   fprintf_filtered (file, ")");
   fprintf_filtered (file, "\n");
 }
@@ -2374,7 +2370,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   /* None found, create a new architecture from the information
      provided.  */
-  tdep = XMALLOC (struct gdbarch_tdep);
+  tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
 
   /* Determine the ABI */
This page took 0.027377 seconds and 4 git commands to generate.