import gdb-1999-07-12 snapshot

This commit is contained in:
Jason Molenda 1999-07-12 11:15:22 +00:00
parent edac9bffc1
commit 43e526b9b4
29 changed files with 423 additions and 167 deletions

View file

@ -1,3 +1,4 @@
1999-05-08 Felix Lee <flee@cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.

View file

@ -30,7 +30,6 @@ typedef char * VoidStar ;
#endif
typedef unsigned long ARMword ; /* must be 32 bits wide */
typedef struct ARMul_State ARMul_State ;
typedef unsigned ARMul_CPInits(ARMul_State *state) ;

View file

@ -464,6 +464,7 @@ ARMword ARMul_Emulate26(register ARMul_State *state)
if (temp) { /* if the condition codes don't match, stop here */
mainswitch:
switch ((int)BITS(20,27)) {
/***************************************************************************\
@ -877,6 +878,7 @@ mainswitch:
break ;
case 0x10 : /* TST reg and MRS CPSR and SWP word */
#ifdef MODET
if (BITS(4,11) == 0xB) {
/* STRH register offset, no write-back, down, pre indexed */

View file

@ -1,3 +1,26 @@
Sun Jul 11 23:47:20 1999 Andrew Cagney <cagney@b1.cygnus.com>
* sim-resume.c (sim_resume): Ensure that the siggnal [sic] is only
passed in when sim_resume is first entered - don't re-pass it
after a restart.
Sun Jul 11 23:34:44 1999 Andrew Cagney <cagney@b1.cygnus.com>
* sim-options.c (standard_option_handler): Add OPTION_LOAD_VMA and
OPTION_LOAD_LMA but only when is defined.
(standard_options): When SIM_HANDLES_LMA is defined include
options --load-lma and --load-vma.
(standard_install): Initialize STATE_LOAD_AT_LMA_P.
* sim-base.h (STATE_LOAD_AT_LMA_P): Define.
(struct sim_state_base): Add load_at_lma_p.
* sim-hload.c (sim_load): Replace SIM_HANDLES_LMA with
STATE_LOAD_AT_LMA_P.
Sun Jul 11 12:03:36 1999 Andrew Cagney <cagney@b1.cygnus.com>
* nrun.c (main): Re-format loop gnu style.
Wed Jul 7 19:56:03 1999 Andrew Cagney <cagney@b1.cygnus.com>
* dv-sockser.c (connected_p): Initialize addrlen.

View file

@ -416,27 +416,3 @@
/* end v850 sys target macros */
#endif
#endif
#ifdef NL_TARGET_venus
#ifdef sys_defs
/* from syscall.h */
/* begin venus sys target macros */
{ "SYS_argv", 13 },
{ "SYS_argvlen", 12 },
{ "SYS_chdir", 14 },
{ "SYS_chmod", 16 },
{ "SYS_close", 3 },
{ "SYS_exit", 1 },
{ "SYS_fstat", 10 },
{ "SYS_getpid", 8 },
{ "SYS_kill", 9 },
{ "SYS_lseek", 6 },
{ "SYS_open", 2 },
{ "SYS_read", 4 },
{ "SYS_stat", 15 },
{ "SYS_time", 18 },
{ "SYS_unlink", 7 },
{ "SYS_utime", 17 },
{ "SYS_write", 5 },
/* end venus sys target macros */
#endif
#endif

View file

@ -137,41 +137,44 @@ main (int argc, char **argv)
((reason == sim_stopped) &&
(STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)));
}
else do
else
{
do
{
#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
struct sigaction sa, osa;
sa.sa_handler = cntrl_c;
sigemptyset (&sa.sa_mask);
sa.sa_flags = 0;
sigaction (SIGINT, &sa, &osa);
prev_sigint = osa.sa_handler;
struct sigaction sa, osa;
sa.sa_handler = cntrl_c;
sigemptyset (&sa.sa_mask);
sa.sa_flags = 0;
sigaction (SIGINT, &sa, &osa);
prev_sigint = osa.sa_handler;
#else
prev_sigint = signal (SIGINT, cntrl_c);
prev_sigint = signal (SIGINT, cntrl_c);
#endif
sim_resume (sd, 0, sigrc);
signal (SIGINT, prev_sigint);
sim_stop_reason (sd, &reason, &sigrc);
if ((reason == sim_stopped) &&
(sigrc == sim_signal_to_host (sd, SIM_SIGINT)))
break; /* exit on control-C */
/* remain on signals in oe mode */
} while ((reason == sim_stopped) &&
(STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT));
sim_resume (sd, 0, sigrc);
signal (SIGINT, prev_sigint);
sim_stop_reason (sd, &reason, &sigrc);
if ((reason == sim_stopped) &&
(sigrc == sim_signal_to_host (sd, SIM_SIGINT)))
break; /* exit on control-C */
/* remain on signals in oe mode */
} while ((reason == sim_stopped) &&
(STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT));
}
/* Print any stats the simulator collected. */
sim_info (sd, 0);
/* Shutdown the simulator. */
sim_close (sd, 0);
/* If reason is sim_exited, then sigrc holds the exit code which we want
to return. If reason is sim_stopped or sim_signalled, then sigrc holds
the signal that the simulator received; we want to return that to
indicate failure. */
#ifdef SIM_H8300 /* FIXME: Ugh. grep for SLEEP in compile.c */
if (sigrc == SIGILL)
abort ();

View file

@ -237,6 +237,11 @@ typedef struct {
#endif
/* Should image loads be performed using the LMA or VMA? Older
simulators use the VMA while newer simulators prefer the LMA. */
int load_at_lma_p;
#define STATE_LOAD_AT_LMA_P(SD) ((SD)->base.load_at_lma_p)
/* Marker for those wanting to do sanity checks.
This should remain the last member of this struct to help catch
miscompilation errors. */

View file

@ -45,20 +45,14 @@ sim_load (sd, prog_name, prog_bfd, from_tty)
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));

View file

@ -111,6 +111,8 @@ typedef enum {
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
OPTION_H8300,
#endif
OPTION_LOAD_LMA,
OPTION_LOAD_VMA,
} STANDARD_OPTIONS;
static const OPTION standard_options[] =
@ -182,6 +184,19 @@ static const OPTION standard_options[] =
'\0', "BFDNAME", "Specify the object-code format for the object files",
standard_option_handler },
#ifdef SIM_HANDLES_LMA
{ {"load-lma", no_argument, NULL, OPTION_LOAD_LMA},
'\0', NULL,
#if SIM_HANDLES_LMA
"Use VMA or LMA addresses when loading image (default LMA)",
#else
"Use VMA or LMA addresses when loading image (default VMA)",
#endif
standard_option_handler, "load-{lma,vma}" },
{ {"load-vma", no_argument, NULL, OPTION_LOAD_VMA},
'\0', NULL, "", standard_option_handler, "" },
#endif
{ {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL }
};
@ -394,6 +409,18 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
break;
}
case OPTION_LOAD_LMA:
{
STATE_LOAD_AT_LMA_P (sd) = 1;
break;
}
case OPTION_LOAD_VMA:
{
STATE_LOAD_AT_LMA_P (sd) = 0;
break;
}
case OPTION_HELP:
sim_print_help (sd, is_command);
if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE)
@ -413,6 +440,9 @@ standard_install (SIM_DESC sd)
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
if (sim_add_option_table (sd, NULL, standard_options) != SIM_RC_OK)
return SIM_RC_FAIL;
#ifdef SIM_HANDLES_LMA
STATE_LOAD_AT_LMA_P (sd) = SIM_HANDLES_LMA;
#endif
return SIM_RC_OK;
}

View file

@ -70,6 +70,11 @@ sim_resume (SIM_DESC sd,
if (next_cpu_nr >= nr_cpus)
next_cpu_nr = 0;
/* Only deliver the siggnal ]sic] the first time through - don't
re-deliver any siggnal during a restart. */
if (jmpval == sim_engine_restart_jmpval)
siggnal = 0;
#ifdef SIM_CPU_EXCEPTION_RESUME
{
sim_cpu* cpu = STATE_CPU (sd, next_cpu_nr);

View file

@ -1,3 +1,17 @@
Mon Jul 12 00:02:27 1999 Andrew Cagney <cagney@amy.cygnus.com>
* interp.c (sim_monitor): Flush output before reading input.
Sun Jul 11 19:28:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
* tconfig.in (SIM_HANDLES_LMA): Always define.
Thu Jul 8 16:06:59 1999 Andrew Cagney <cagney@b1.cygnus.com>
From Mark Salter <msalter@cygnus.com>:
* interp.c (BOARD_BSP): Define. Add to list of possible boards.
(sim_open): Add setup for BSP board.
Wed Jul 7 12:45:58 1999 Andrew Cagney <cagney@b1.cygnus.com>
* mips.igen (MULT, MULTU): Add syntax for two operand version.

View file

@ -257,6 +257,8 @@ static const OPTION mips_options[] =
"|" BOARD_JMR3904_PAL
#define BOARD_JMR3904_DEBUG "jmr3904debug"
"|" BOARD_JMR3904_DEBUG
#define BOARD_BSP "bsp"
"|" BOARD_BSP
, "Customize simulation for a particular board.", mips_option_handler },
@ -352,12 +354,40 @@ sim_open (kind, cb, abfd, argv)
device_init(sd);
}
else if (board != NULL
&& (strcmp(board, BOARD_BSP) == 0))
{
int i;
STATE_ENVIRONMENT (sd) = OPERATING_ENVIRONMENT;
/* ROM: 0x9FC0_0000 - 0x9FFF_FFFF and 0xBFC0_0000 - 0xBFFF_FFFF */
sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx,0x%0x",
0x9FC00000,
4 * 1024 * 1024, /* 4 MB */
0xBFC00000);
/* SRAM: 0x8000_0000 - 0x803F_FFFF and 0xA000_0000 - 0xA03F_FFFF */
sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx,0x%0x",
0x80000000,
4 * 1024 * 1024, /* 4 MB */
0xA0000000);
/* DRAM: 0x8800_0000 - 0x89FF_FFFF and 0xA800_0000 - 0xA9FF_FFFF */
for (i=0; i<8; i++) /* 32 MB total */
{
unsigned size = 4 * 1024 * 1024; /* 4 MB */
sim_do_commandf (sd, "memory alias 0x%lx@1,0x%lx,0x%0x",
0x88000000 + (i * size),
size,
0xA8000000 + (i * size));
}
}
#if (WITH_HW)
if (board != NULL
&& (strcmp(board, BOARD_JMR3904) == 0 ||
strcmp(board, BOARD_JMR3904_PAL) == 0 ||
strcmp(board, BOARD_JMR3904_DEBUG) == 0))
else if (board != NULL
&& (strcmp(board, BOARD_JMR3904) == 0 ||
strcmp(board, BOARD_JMR3904_PAL) == 0 ||
strcmp(board, BOARD_JMR3904_DEBUG) == 0))
{
/* match VIRTUAL memory layout of JMR-TX3904 board */
int i;
@ -973,6 +1003,8 @@ sim_monitor (SIM_DESC sd,
case 11: /* char inbyte(void) */
{
char tmp;
/* ensure that all output has gone... */
sim_io_flush_stdout (sd);
if (sim_io_read_stdin (sd, &tmp, sizeof(char)) != sizeof(char))
{
sim_io_error(sd,"Invalid return from character read");

View file

@ -12,6 +12,8 @@
MODULE_INSTALL_FN dv_sockser_install;
#define MODULE_LIST dv_sockser_install,
#else
#define SIM_HANDLES_LMA 0
#endif
/* Define this if the simulator supports profiling.