projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Emit a warning when -z relro is unsupported
[deliverable/binutils-gdb.git]
/
sim
/
m32c
/
trace.c
diff --git
a/sim/m32c/trace.c
b/sim/m32c/trace.c
index 9e526fe935b6ee7545d3969d4ca18e4362cd400b..df28159422685c79e69f37291b3a6598ac1108b2 100644
(file)
--- a/
sim/m32c/trace.c
+++ b/
sim/m32c/trace.c
@@
-1,6
+1,6
@@
/* trace.c --- tracing output for the M32C simulator.
/* trace.c --- tracing output for the M32C simulator.
-Copyright (C) 2005
, 2007
Free Software Foundation, Inc.
+Copyright (C) 2005
-2020
Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of the GNU simulators.
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/>. */
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 <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
@@
-34,6
+34,7
@@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "cpu.h"
#include "mem.h"
#include "load.h"
#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,
static int
sim_dis_read (bfd_vma memaddr, bfd_byte * ptr, unsigned int length,
@@
-101,7
+102,7
@@
op_printf (char *buf, char *fmt, ...)
static bfd *current_bfd;
void
static bfd *current_bfd;
void
-sim_disasm_init (bfd *prog)
+sim_disasm_init (bfd *
prog)
{
current_bfd = prog;
}
{
current_bfd = prog;
}
@@
-128,6
+129,7
@@
load_file_and_line (const char *filename, int lineno)
int i;
struct stat s;
const char *found_filename, *slash;
int i;
struct stat s;
const char *found_filename, *slash;
+ FILE *file;
found_filename = filename;
while (1)
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);
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);
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
}
void
-sim_disasm_one ()
+sim_disasm_one (
void
)
{
static int initted = 0;
static asymbol **symtab = 0;
{
static int initted = 0;
static asymbol **symtab = 0;
@@
-229,7
+231,7
@@
sim_disasm_one ()
if (s->flags & SEC_CODE || code_section == 0)
{
code_section = s;
if (s->flags & SEC_CODE || code_section == 0)
{
code_section = s;
- code_base = bfd_section_lma (
current_bfd,
s);
+ code_base = bfd_section_lma (s);
break;
}
}
break;
}
}
@@
-253,7
+255,7
@@
sim_disasm_one ()
slash++;
printf
("========================================"
slash++;
printf
("========================================"
-
"=====================================\n");
+ "=====================================\n");
printf ("\033[37;41m %s:%d: \033[33;40m %s\033[K\033[0m\n",
slash, lineno, the_line);
}
printf ("\033[37;41m %s:%d: \033[33;40m %s\033[K\033[0m\n",
slash, lineno, the_line);
}
@@
-271,7
+273,7
@@
sim_disasm_one ()
sym = (min + max) / 2;
sa = bfd_asymbol_value (symtab[sym]);
/*printf("checking %4d %08x %s\n",
sym = (min + max) / 2;
sa = bfd_asymbol_value (symtab[sym]);
/*printf("checking %4d %08x %s\n",
-
sym, sa, bfd_asymbol_name (symtab[sym])); */
+ sym, sa, bfd_asymbol_name (symtab[sym])); */
if (sa > mypc)
max = sym;
else if (sa < mypc)
if (sa > mypc)
max = sym;
else if (sa < mypc)
This page took
0.025709 seconds
and
4
git commands to generate.