X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=sim%2Fm32c%2Ftrace.c;h=e507c978b831cbda66642e26a56e2d0e93561cf1;hb=42a4f53d2bf8938c2aeda9f52be7a20534b214a9;hp=64084edb3d8788b39e5569277dce4f70ce6ef196;hpb=a6ff997ce8307ea4be649d4e8de0c07d21048a30;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/m32c/trace.c b/sim/m32c/trace.c index 64084edb3d..e507c978b8 100644 --- a/sim/m32c/trace.c +++ b/sim/m32c/trace.c @@ -1,6 +1,6 @@ /* trace.c --- tracing output for the M32C simulator. -Copyright (C) 2005, 2007-2012 Free Software Foundation, Inc. +Copyright (C) 2005-2019 Free Software Foundation, Inc. Contributed by Red Hat, Inc. This file is part of the GNU simulators. @@ -34,6 +34,7 @@ along with this program. If not, see . */ #include "cpu.h" #include "mem.h" #include "load.h" +#include "trace.h" static int sim_dis_read (bfd_vma memaddr, bfd_byte * ptr, unsigned int length, @@ -128,6 +129,7 @@ load_file_and_line (const char *filename, int lineno) int i; struct stat s; const char *found_filename, *slash; + FILE *file; found_filename = filename; while (1) @@ -145,7 +147,7 @@ load_file_and_line (const char *filename, int lineno) files = f; f->filename = strdup (filename); f->data = (char *) malloc (s.st_size + 2); - FILE *file = fopen (found_filename, "rb"); + file = fopen (found_filename, "rb"); fread (f->data, 1, s.st_size, file); f->data[s.st_size] = 0; fclose (file); @@ -174,7 +176,7 @@ load_file_and_line (const char *filename, int lineno) } void -sim_disasm_one () +sim_disasm_one (void) { static int initted = 0; static asymbol **symtab = 0;