+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * wrapper.c (sim_create_inferior, sim_open): Rename _bfd to bfd.
+
2003-01-10 Ben Elliston <bje@redhat.com>
* README.Cygnus: Rename from this ..
SIM_RC
sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd ATTRIBUTE_UNUSED;
- struct _bfd * abfd;
+ struct bfd * abfd;
char ** argv;
char ** env;
{
sim_open (kind, ptr, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *ptr;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
sim_kind = kind;
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * sim-utils.h (sim_analyze_program, sim_load_file): Rename _bfd to bfd.
+ * sim-hload.c (sim_load), sim-base.h (sim_state_base): Ditto.
+ * nrun.c (main): Ditto.
+
2003-02-26 Andrew Cagney <cagney@redhat.com>
* sim-engine.h (sim_engine_abort): Add noreturn attribute.
{
char *name;
char **prog_argv = NULL;
- struct _bfd *prog_bfd;
+ struct bfd *prog_bfd;
enum sim_stop reason;
int sigrc = 0;
int single_step = 0;
#define STATE_PROG_ARGV(sd) ((sd)->base.prog_argv)
/* The program's bfd. */
- struct _bfd *prog_bfd;
+ struct bfd *prog_bfd;
#define STATE_PROG_BFD(sd) ((sd)->base.prog_bfd)
/* Symbol table for prog_bfd */
sim_load (sd, prog_name, prog_bfd, from_tty)
SIM_DESC sd;
char *prog_name;
- struct _bfd *prog_bfd;
+ struct bfd *prog_bfd;
int from_tty;
{
bfd *result_bfd;
incorrectly write the program sections at LMA interpreted as a
virtual address. This is still accommodated for backward
compatibility reasons. */
- /* FIXME: The following simulators use this file as of 980313:
- m32r, mips, v850 [grep for sim-hload in all Makefile.in's].
- Each of these should be properly using lma. When this is confirmed,
- SIM_HANDLES_LMA can go away. */
-#ifndef SIM_HANDLES_LMA
-#define SIM_HANDLES_LMA 0
-#endif
result_bfd = sim_load_file (sd, STATE_MY_NAME (sd),
STATE_CALLBACK (sd),
prog_name,
STATE_PROG_BFD (sd),
STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG,
- SIM_HANDLES_LMA, sim_write);
+ STATE_LOAD_AT_LMA_P (sd),
+ sim_write);
if (result_bfd == NULL)
{
bfd_close (STATE_PROG_BFD (sd));
/* Utilities for manipulating the load image. */
SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name,
- struct _bfd *prog_bfd);
+ struct bfd *prog_bfd);
/* Load program PROG into the simulator using the function DO_LOAD.
If PROG_BFD is non-NULL, the file has already been opened.
typedef int sim_write_fn PARAMS ((SIM_DESC sd, SIM_ADDR mem,
unsigned char *buf, int length));
-struct _bfd *sim_load_file (SIM_DESC sd, const char *myname,
- host_callback *callback, char *prog,
- struct _bfd *prog_bfd, int verbose_p,
- int lma_p, sim_write_fn do_load);
+struct bfd *sim_load_file (SIM_DESC sd, const char *myname,
+ host_callback *callback, char *prog,
+ struct bfd *prog_bfd, int verbose_p,
+ int lma_p, sim_write_fn do_load);
/* Internal version of sim_do_command, include formatting */
void sim_do_commandf (SIM_DESC sd, const char *fmt, ...);
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-11-13 Andrew Cagney <cagney@redhat.com>
* simops.c: Include <string.h>.
sim_open (kind, callback, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *callback;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
struct simops *s;
SIM_RC
sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interf.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
sim_open (kind, callback, abfd, argv)
SIM_OPEN_KIND kind;
struct host_callback_struct *callback;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
SIM_RC
sim_create_inferior(sd, abfd, argv, env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * compile.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2003-02-05 Kazu Hirata <kazu@cs.umass.edu>
* compile.c (init_pointers): Abort if wreg never gets initialized.
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
struct host_callback_struct *ptr,
- struct _bfd *abfd,
+ struct bfd *abfd,
char **argv)
{
/* FIXME: Much of the code in sim_load can be moved here. */
}
SIM_RC
-sim_create_inferior (SIM_DESC sd, struct _bfd *abfd, char **argv, char **env)
+sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
{
if (abfd != NULL)
cpu.pc = bfd_get_start_address (abfd);
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * compile.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
sim_kind = kind;
SIM_RC
sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * sim-if.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
disassembler. */
static CGEN_DISASSEMBLER i960_disassemble_insn;
-/* Records simulator descriptor so utilities like m32r_dump_regs can be
+/* Records simulator descriptor so utilities like i960_dump_regs can be
called from gdb. */
SIM_DESC current_state;
\f
sim_open (kind, callback, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *callback;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
char c;
/* Open a copy of the cpu descriptor table. */
{
- CGEN_CPU_DESC cd = i960_cgen_cpu_open (STATE_ARCHITECTURE (sd)->mach,
- CGEN_ENDIAN_LITTLE);
+ CGEN_CPU_DESC cd = i960_cgen_cpu_open_1 (STATE_ARCHITECTURE (sd)->printable_name,
+ CGEN_ENDIAN_LITTLE);
for (i = 0; i < MAX_NR_PROCESSORS; ++i)
{
SIM_CPU *cpu = STATE_CPU (sd, i);
}
/* Initialize various cgen things not done by common framework.
- Must be done after m32r_cgen_cpu_open. */
+ Must be done after i960_cgen_cpu_open. */
cgen_init (sd);
- /* Store in a global so things like sparc32_dump_regs can be invoked
+ /* Store in a global so things like i960_dump_regs can be invoked
from the gdb command line. */
current_state = sd;
SIM_RC
sim_create_inferior (sd, abfd, argv, envp)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **envp;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * sim-if.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-12-19 Doug Evans <dje@sebabeach.org>
* arch.c,arch.h,cpuall.h: Regenerate.
sim_open (kind, callback, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *callback;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
SIM_DESC sd = sim_state_alloc (kind, callback);
/* Open a copy of the cpu descriptor table. */
{
- CGEN_CPU_DESC cd = m32r_cgen_cpu_open (STATE_ARCHITECTURE (sd)->mach,
- CGEN_ENDIAN_BIG);
+ CGEN_CPU_DESC cd = m32r_cgen_cpu_open_1 (STATE_ARCHITECTURE (sd)->printable_name,
+ CGEN_ENDIAN_BIG);
for (i = 0; i < MAX_NR_PROCESSORS; ++i)
{
SIM_CPU *cpu = STATE_CPU (sd, i);
SIM_RC
sim_create_inferior (sd, abfd, argv, envp)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **envp;
{
PROFILE_LABEL_WIDTH, "Fill nops:",
sim_add_commas (buf, sizeof (buf),
CPU_M32R_MISC_PROFILE (cpu)->fillnop_count));
+ if (STATE_ARCHITECTURE (sd)->mach == bfd_mach_m32rx)
+ sim_io_printf (sd, " %-*s %s\n\n",
+ PROFILE_LABEL_WIDTH, "Parallel insns:",
+ sim_add_commas (buf, sizeof (buf),
+ CPU_M32R_MISC_PROFILE (cpu)->parallel_count));
}
}
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_prepare_for_program, sim_open)
+ (sim_create_inferior): Rename _bfd to bfd.
+
2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
* dv-m68hc11eepr.c (struct m68hc11eepr ): Use const char* for filename.
}
static int
-sim_prepare_for_program (SIM_DESC sd, struct _bfd* abfd)
+sim_prepare_for_program (SIM_DESC sd, struct bfd* abfd)
{
sim_cpu *cpu;
SIM_DESC
sim_open (SIM_OPEN_KIND kind, host_callback *callback,
- struct _bfd *abfd, char **argv)
+ struct bfd *abfd, char **argv)
{
SIM_DESC sd;
sim_cpu *cpu;
}
SIM_RC
-sim_create_inferior (SIM_DESC sd, struct _bfd *abfd,
+sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
char **argv, char **env)
{
return sim_prepare_for_program (sd, abfd);
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback * cb;
- struct _bfd * abfd;
+ struct bfd * abfd;
char ** argv;
{
int osize = sim_memory_size;
SIM_RC
sim_create_inferior (sd, prog_bfd, argv, env)
SIM_DESC sd;
- struct _bfd * prog_bfd;
+ struct bfd * prog_bfd;
char ** argv;
char ** env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_open):
+ (sim_create_inferior):
+
2003-01-14 Chris Demetriou <cgd@broadcom.com>
* mips.igen (LUXC1, SUXC1): New, for mipsV and mips64.
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
SIM_DESC sd = sim_state_alloc (kind, cb);
SIM_RC
sim_create_inferior (sd, abfd, argv,env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
#include "mn10200_sim.h"
+#ifdef NEED_UI_LOOP_HOOK
+/* How often to run the ui_loop update, when in use */
+#define UI_LOOP_POLL_INTERVAL 0x60000
+
+/* Counter for the ui_loop_hook update */
+static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
+
+/* Actual hook to call to run through gdb's gui event loop */
+extern int (*ui_loop_hook) (int);
+#endif /* NEED_UI_LOOP_HOOK */
+
host_callback *mn10200_callback;
int mn10200_debug;
static SIM_OPEN_KIND sim_kind;
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
struct simops *s;
sim_stop (sd)
SIM_DESC sd;
{
- return 0;
+ State.exception = SIGINT;
+ return 1;
}
void
{
unsigned long insn, extension;
+#ifdef NEED_UI_LOOP_HOOK
+ if (ui_loop_hook != NULL && ui_loop_hook_counter-- < 0)
+ {
+ ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
+ ui_loop_hook (0);
+ }
+#endif /* NEED_UI_LOOP_HOOK */
+
/* Fetch the current instruction, fetch a double word to
avoid redundant fetching for the common cases below. */
inst = load_mem_big (PC, 2);
SIM_RC
sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_open, sim_create_inferior, sim_open)
+ (sim_create_inferior): Rename _bfd to bfd.
+
2003-02-26 Andrew Cagney <cagney@redhat.com>
* am33.igen: Call sim_engine_abort instead of abort.
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
struct simops *s;
SIM_RC
sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
SIM_DESC sd = sim_state_alloc (kind, cb);
}
else
{
- if ( NULL != board )
- {
- printf("Error: invalid --board option.\n");
- return 0;
+ if (board != NULL)
+ {
+ sim_io_eprintf (sd, "Error: Board `%s' unknown.\n", board);
+ return 0;
}
}
SIM_RC
sim_create_inferior (sd, prog_bfd, argv, env)
SIM_DESC sd;
- struct _bfd *prog_bfd;
+ struct bfd *prog_bfd;
char **argv;
char **env;
{
{
int status;
struct hw *device;
+ static int in_interrupt = 0;
#ifdef SIM_CPU_EXCEPTION_TRIGGER
SIM_CPU_EXCEPTION_TRIGGER(sd,cpu,cia);
#endif
- /* copy NMI handler code from dv-mn103cpu.c */
- /* XXX: possible infinite recursion if these store_*() calls fail! */
- store_word (SP - 4, CIA_GET (cpu));
- store_half (SP - 8, PSW);
+ /* avoid infinite recursion */
+ if (in_interrupt)
+ {
+ (*mn10300_callback->printf_filtered) (mn10300_callback,
+ "ERROR: recursion in program_interrupt during software exception dispatch.");
+ }
+ else
+ {
+ in_interrupt = 1;
+ /* copy NMI handler code from dv-mn103cpu.c */
+ store_word (SP - 4, CIA_GET (cpu));
+ store_half (SP - 8, PSW);
+
+ /* Set the SYSEF flag in NMICR by backdoor method. See
+ dv-mn103int.c:write_icr(). This is necessary because
+ software exceptions are not modelled by actually talking to
+ the interrupt controller, so it cannot set its own SYSEF
+ flag. */
+ if ((NULL != board) && (strcmp(board, BOARD_AM32) == 0))
+ store_byte (0x34000103, 0x04);
+ }
+
PSW &= ~PSW_IE;
SP = SP - 8;
CIA_SET (cpu, 0x40000008);
+ in_interrupt = 0;
sim_engine_halt(sd, cpu, NULL, cia, sim_stopped, sig);
}
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * sim_calls.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-09-27 Andrew Cagney <ac131313@redhat.com>
* hw_disk.c (hw_disk_init_address): Set device type to "block",
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
host_callback *callback,
- struct _bfd *abfd,
+ struct bfd *abfd,
char **argv)
{
callbacks = callback;
SIM_RC
sim_create_inferior (SIM_DESC sd,
- struct _bfd *abfd,
+ struct bfd *abfd,
char **argv,
char **envp)
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (init_dsp, sim_open, sim_create_inferior): Rename _bfd
+ to bfd.
+
Fri Oct 11 16:22:28 2002 J"orn Rennecke <joern.rennecke@superh.com>
* interp.c (trap): Return int. Take extra parameter for address
static void
init_dsp (abfd)
- struct _bfd *abfd;
+ struct bfd *abfd;
{
int was_dsp = target_dsp;
unsigned long mach = bfd_get_mach (abfd);
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
char **p;
SIM_RC
sim_create_inferior (sd, prog_bfd, argv, env)
SIM_DESC sd;
- struct _bfd *prog_bfd;
+ struct bfd *prog_bfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-11-30 Andrew Cagney <cagney@redhat.com>
* simops.c: Use int, 1, 0 instead of boolean, true and false.
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
SIM_DESC sd = sim_state_alloc (kind, cb);
SIM_RC
sim_create_inferior (sd, prog_bfd, argv, env)
SIM_DESC sd;
- struct _bfd *prog_bfd;
+ struct bfd *prog_bfd;
char **argv;
char **env;
{
+2003-02-27 Andrew Cagney <cagney@redhat.com>
+
+ * iface.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
+
2002-06-16 Andrew Cagney <ac131313@redhat.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
sim_open (kind, cb, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *cb;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
{
/* FIXME: The code in sim_load that determines the exact z8k arch
SIM_RC
sim_create_inferior (sd, abfd, argv, env)
SIM_DESC sd;
- struct _bfd *abfd;
+ struct bfd *abfd;
char **argv;
char **env;
{