diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-03-16 17:41:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-03-16 17:41:54 +0000 |
commit | a531a7cd80049ec07bec2d54a085aa37fb23d2d0 (patch) | |
tree | de773f4b2ee4436c7c6b4fc750bcb07064790aec /sim-scripts | |
parent | 43e95b9f413dc5193c4cd46450727fa2ef73cc5e (diff) |
2009-03-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* gdb-sim.in, psim.in: Add -s to psim-gdb as way to turn on System V
IPC support.
Diffstat (limited to 'sim-scripts')
-rw-r--r-- | sim-scripts/ChangeLog | 5 | ||||
-rwxr-xr-x | sim-scripts/gdb-sim.in | 42 | ||||
-rw-r--r-- | sim-scripts/psim.in | 4 |
3 files changed, 47 insertions, 4 deletions
diff --git a/sim-scripts/ChangeLog b/sim-scripts/ChangeLog index 13654a8..495ba77 100644 --- a/sim-scripts/ChangeLog +++ b/sim-scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-03-16 Joel Sherrill <joel.sherrill@oarcorp.com> + + * gdb-sim.in, psim.in: Add -s to psim-gdb as way to turn on System V + IPC support. + 2009-01-22 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile: Add nosim. diff --git a/sim-scripts/gdb-sim.in b/sim-scripts/gdb-sim.in index 47873aa..debdd02 100755 --- a/sim-scripts/gdb-sim.in +++ b/sim-scripts/gdb-sim.in @@ -13,6 +13,13 @@ trap "test_exit 1" 1 2 3 13 14 15 progname=${0##*/} # fast basename hack for ksh, bash +USAGE=\ +"usage: $progname [ -opts ] test + -i -- interactive (default=no time limit) + +System V IPC and Coverage are not supported by all BSPs or simulators. +" + for v in 4.10 4.9 4.8 4.7 "" do type @CPU_TARGET@-rtems${v}-gdb >/dev/null 2>&1 @@ -40,11 +47,41 @@ test_exit() exit $exit_code } +# log an error to stderr +prerr() +{ + echo "$*" >&2 +} + +fatal() { + [ "$1" ] && prerr $* + prerr "$USAGE" + exit 1 +} + +warn() { + [ "$1" ] && prerr $* +} + if [ $# -eq 0 ] ; then echo "No arguments .. no executable specified" exit 1 fi +use_sysv_ipc="no" +while getopts s OPT +do + case "$OPT" in + s) use_sysv_ipc="yes";; + *) ;; + esac +done + +shiftcount=`expr $OPTIND - 1` +shift $shiftcount + +args=$* + ### Set BSP defaults. If BSP does not have default, it will override bspGeneratesGDBCommands="no" bspGeneratesDeviceTree="no" @@ -74,8 +111,8 @@ else fi >@BSP@-cmds ### Add CPU specific commands -case @CPU@ in - powerpc) echo "b C_exception_handler" ;; +case @CPU_TARGET@ in + *powerpc*) echo "b C_exception_handler" ;; *) ;; esac >>@BSP@-cmds @@ -87,6 +124,7 @@ b __assert printf "Use run to start the RTEMS application\\n" EOF +exit 0 ${GDB} --command=@BSP@-cmds $* if [ ${bspGeneratesDeviceTree} = "yes" ] ; then diff --git a/sim-scripts/psim.in b/sim-scripts/psim.in index 8a84b4f..954cd95 100644 --- a/sim-scripts/psim.in +++ b/sim-scripts/psim.in @@ -42,10 +42,10 @@ bspTreeFile=psim_tree.${LOGNAME} ### Generate the PSIM device tree based upon the type of application being run bspGenerateDeviceTree() { - enable_sysv_ipc="yes" + enable_sysv_devices="yes" if [ X${use_sysv_ipc} = X"yes" ] ; then - enable_sysv_ipc="yes" + enable_sysv_devices="yes" value=-1 # for now assume we are slave in this mode else case ${1} in |