/* Main simulator entry points specific to the FRV.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
Contributed by Red Hat.
This file is part of the GNU simulators.
#define WANT_CPU
#define WANT_CPU_FRVBF
#include "sim-main.h"
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#include "sim-options.h"
#include "libiberty.h"
#include "bfd.h"
static void free_state (SIM_DESC);
static void print_frv_misc_cpu (SIM_CPU *cpu, int verbose);
-
-/* Records simulator descriptor so utilities like frv_dump_regs can be
- called from gdb. */
-SIM_DESC current_state;
\f
/* Cover function of sim_state_free to free the cpu buffers as well. */
SIM_OPEN_KIND kind;
host_callback *callback;
bfd *abfd;
- char **argv;
+ char * const *argv;
{
char c;
int i;
augment the meaning of an option. */
sim_add_option_table (sd, NULL, frv_options);
- /* getopt will print the error message so we just have to exit if this fails.
- FIXME: Hmmm... in the case of gdb we need getopt to call
- print_filtered. */
+ /* The parser will print an error message for us, so we silently return. */
if (sim_parse_args (sd, argv) != SIM_RC_OK)
{
free_state (sd);
frv_initialize (cpu, sd);
}
- /* Store in a global so things like sparc32_dump_regs can be invoked
- from the gdb command line. */
- current_state = sd;
-
return sd;
}
sim_create_inferior (sd, abfd, argv, envp)
SIM_DESC sd;
bfd *abfd;
- char **argv;
- char **envp;
+ char * const *argv;
+ char * const *envp;
{
SIM_CPU *current_cpu = STATE_CPU (sd, 0);
SIM_ADDR addr;