breakpoints/19546: Fix crash after updating breakpoints
[deliverable/binutils-gdb.git] / sim / m32c / load.c
index b125f22b47a255a55be84608cc4990a0e794bd09..23c89f8b1c888834f0255c825dc07fd7c1114bc9 100644 (file)
@@ -1,6 +1,6 @@
 /* load.c --- loading object files into the M32C simulator.
 
-Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+Copyright (C) 2005-2016 Free Software Foundation, Inc.
 Contributed by Red Hat, Inc.
 
 This file is part of the GNU simulators.
@@ -18,7 +18,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-
+#include "config.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -27,8 +27,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "cpu.h"
 #include "mem.h"
+#include "load.h"
 
-int (*decode_opcode) () = 0;
+int (*decode_opcode) (void) = 0;
 int default_machine = 0;
 
 void
@@ -54,7 +55,7 @@ m32c_set_mach (unsigned long mach)
 }
 
 void
-m32c_load (bfd *prog)
+m32c_load (bfd * prog)
 {
   asection *s;
   unsigned long mach = bfd_get_mach (prog);
@@ -88,12 +89,13 @@ m32c_load (bfd *prog)
        {
          char *buf;
          bfd_size_type size;
+         bfd_vma base;
 
          size = bfd_get_section_size (s);
          if (size <= 0)
            continue;
 
-         bfd_vma base = bfd_section_lma (prog, s);
+         base = bfd_section_lma (prog, s);
          if (verbose)
            fprintf (stderr, "[load a=%08x s=%08x %s]\n",
                     (int) base, (int) size, bfd_get_section_name (prog, s));
This page took 0.032022 seconds and 4 git commands to generate.