/* run front end support for arm
- Copyright (C) 1995-1997, 2000-2002, 2007-2012 Free Software
- Foundation, Inc.
+ Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of ARM SIM.
#include "run-sim.h"
#include "gdb/sim-arm.h"
#include "gdb/signals.h"
+#include "libiberty.h"
host_callback *sim_callback;
}
void
-ARMul_ConsolePrint VPARAMS ((ARMul_State * state,
- const char * format,
- ...))
+ARMul_ConsolePrint (ARMul_State * state,
+ const char * format,
+ ...)
{
va_list ap;
int mach;
char **arg;
+ init ();
+
if (abfd != NULL)
- ARMul_SetPC (state, bfd_get_start_address (abfd));
+ {
+ ARMul_SetPC (state, bfd_get_start_address (abfd));
+ mach = bfd_get_mach (abfd);
+ }
else
- ARMul_SetPC (state, 0); /* ??? */
-
- mach = bfd_get_mach (abfd);
+ {
+ ARMul_SetPC (state, 0); /* ??? */
+ mach = 0;
+ }
switch (mach)
{
ARMul_SelectProcessor (state, ARM_v5_Prop | ARM_v5e_Prop | ARM_XScale_Prop | ARM_v6_Prop);
break;
+ case bfd_mach_arm_iWMMXt2:
case bfd_mach_arm_iWMMXt:
{
extern int SWI_vector_installed;
SIM_DESC sd ATTRIBUTE_UNUSED;
int rn;
unsigned char *memory;
- int length ATTRIBUTE_UNUSED;
+ int length;
{
init ();
return 0;
}
- return -1;
+ return length;
}
int
SIM_DESC sd ATTRIBUTE_UNUSED;
int rn;
unsigned char *memory;
- int length ATTRIBUTE_UNUSED;
+ int length;
{
ARMword regval;
+ int len = length;
init ();
return 0;
}
- while (length)
+ while (len)
{
tomem (state, memory, regval);
- length -= 4;
+ len -= 4;
memory += 4;
regval = 0;
}
- return -1;
+ return length;
}
#ifdef SIM_TARGET_SWITCHES
-static void sim_target_parse_arg_array PARAMS ((char **));
+static void sim_target_parse_arg_array (char **);
typedef struct
{
SIM_RC
sim_load (sd, prog, abfd, from_tty)
SIM_DESC sd;
- char *prog;
+ const char *prog;
bfd *abfd;
int from_tty ATTRIBUTE_UNUSED;
{
if (stop_simulator)
{
*reason = sim_stopped;
- *sigrc = TARGET_SIGNAL_INT;
+ *sigrc = GDB_SIGNAL_INT;
}
else if (state->EndCondition == 0)
{
{
*reason = sim_stopped;
if (state->EndCondition == RDIError_BreakpointReached)
- *sigrc = TARGET_SIGNAL_TRAP;
+ *sigrc = GDB_SIGNAL_TRAP;
else if ( state->EndCondition == RDIError_DataAbort
|| state->EndCondition == RDIError_AddressException)
- *sigrc = TARGET_SIGNAL_BUS;
+ *sigrc = GDB_SIGNAL_BUS;
else
*sigrc = 0;
}
}
char **
-sim_complete_command (SIM_DESC sd, char *text, char *word)
+sim_complete_command (SIM_DESC sd, const char *text, const char *word)
{
return NULL;
}