CPU32 Simulator
As an example of usage, the following is a script that I use to launch a simulation. The simulator is launched using the -f option to load an srecord file.

The script also opens three xterm windows.

#!/bin/bash

PORT=9990

if [ $1 ]; then
   PORT=$1
fi

GDBPORT=$PORT
SERPORT1=$((PORT+1))
SERPORT2=$((PORT+2))

sim68k -f ooosx.srec -p ${GDBPORT} -i 0xc00000 &

echo "sim68k started"

echo $SERPORT1 > SERPORT1
echo $SERPORT2 > SERPORT2

echo "creating xgdbinit ${GDBPORT}"

echo "target est localhost:${GDBPORT}" > xgdbinit

echo "starting gdb"

xterm -e m68k-elf-gdb --command xgdbinit ooosx &

sleep 1

xterm -e dumbterm -h localhost -p ${SERPORT1} &
xterm -e dumbterm -h localhost -p ${SERPORT2} &

The remaining details are left as an exercise to the student ;-)