gdb.ada/arraydim.exp: Fix directory layout
[deliverable/binutils-gdb.git] / gdb / lm32-tdep.c
index 54d80b9ab4a68170854d156bd14d95e8f896e89d..ea83892b049a68f37ced0bcf9a794d0e544a4f95 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for Lattice Mico32 processor, for GDB.
    Contributed by Jon Beniston <jon@beniston.com>
 
-   Copyright (C) 2009-2013 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,8 +37,6 @@
 #include "reggroups.h"
 #include "opcodes/lm32-desc.h"
 
-#include <string.h>
-
 /* Macros to extract fields from an instruction.  */
 #define LM32_OPCODE(insn)       ((insn >> 26) & 0x3f)
 #define LM32_REG0(insn)         ((insn >> 21) & 0x1f)
@@ -291,7 +289,8 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
        regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val);
       else
        {
-         write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type));
+         write_memory_unsigned_integer (sp, TYPE_LENGTH (arg_type), byte_order,
+                                        val);
          sp -= 4;
        }
     }
@@ -424,7 +423,7 @@ lm32_frame_cache (struct frame_info *this_frame, void **this_prologue_cache)
   int i;
 
   if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+    return (struct lm32_frame_cache *) (*this_prologue_cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct lm32_frame_cache);
   (*this_prologue_cache) = info;
@@ -527,7 +526,7 @@ lm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
     return arches->gdbarch;
 
   /* 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);
 
   /* Type sizes.  */
This page took 0.025458 seconds and 4 git commands to generate.