/* run front end support for arm
- Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002
+ Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of ARM SIM.
- GCC is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
- option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
- GCC is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- the GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ 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, write to the Free
- Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* This file provides the interface between the simulator and
run.c and gdb (when the simulator is linked with gdb).
#include "sim-utils.h"
#include "run-sim.h"
#include "gdb/sim-arm.h"
-
-#ifndef SIGTRAP
-#define SIGTRAP 5
-#endif
-
-#ifndef SIGBUS
-#define SIGBUS SIGSEGV
-#endif
+#include "gdb/signals.h"
host_callback *sim_callback;
for (i = 0; argv[i]; i++)
;
- return (void) sim_target_parse_command_line (i, argv);
+ sim_target_parse_command_line (i, argv);
}
void
-sim_target_display_usage ()
+sim_target_display_usage (help)
+ int help;
{
- fprintf (stderr, "%s=<list> Comma seperated list of SWI protocols to supoport.\n\
+ FILE *stream = help ? stdout : stderr;
+
+ fprintf (stream, "%s=<list> Comma seperated list of SWI protocols to supoport.\n\
This list can contain: NONE, DEMON, ANGEL, REDBOOT and/or ALL.\n",
SWI_SWITCH);
}
if (stop_simulator)
{
*reason = sim_stopped;
- *sigrc = SIGINT;
+ *sigrc = TARGET_SIGNAL_INT;
}
else if (state->EndCondition == 0)
{
{
*reason = sim_stopped;
if (state->EndCondition == RDIError_BreakpointReached)
- *sigrc = SIGTRAP;
+ *sigrc = TARGET_SIGNAL_TRAP;
else if ( state->EndCondition == RDIError_DataAbort
|| state->EndCondition == RDIError_AddressException)
- *sigrc = SIGBUS;
+ *sigrc = TARGET_SIGNAL_BUS;
else
*sigrc = 0;
}