Newsgroups: comp.parallel.pvm
From: fantauzz@pluto.sm.dsi.unimi.it (Francesco Fantauzzi)
Subject: pvm3/lib/debugger2
Organization: Computer Science Dep. - Milan University
Date: 16 Jun 1995 12:41:58 GMT
Message-ID: <3rru6m$8l7@ghost.sm.dsi.unimi.it>


#!/bin/csh -f
#
#	debugger2.csh
#
#	this script is invoked in an xterm by the generic debugger script.
#	it starts the debugger and waits when it exits to prevent the
#	window from closing.
#
#	it expects the pvmd to set envar PVM_ARCH.
#
#	06 Apr 1993  Manchek. Altered by Francesco G. fantauzzi 16/6/95
#

set noglob

# scratch file for debugger commands

set TEMPCMD=debugger2.$$

# default debugger and flags

set DBCMD="dbx"
set DBFF="-c $TEMPCMD"

#
# try to pick the debugger by arch name
#

switch ($PVM_ARCH)

case SUN2:
case SUN3:
case SUN4:
	set DBFF="-s $TEMPCMD"
	breaksw

case HPPA:
	set DBCMD="xdb"
	set DBFF="-p $TEMPCMD"
	breaksw

case TITN:
	set DBCMD="dbg"
	set DBFF=""
	breaksw

case NEXT:
	set DBCMD="gdb"
	set DBFF="-q -x $TEMPCMD"
	breaksw

default:
# ALPHA PMAX SYMM RS6K
	breaksw
endsw

#
# run the debugger
#

#echo run $argv[2-] > $TEMPCMD
#echo $DBCMD $DBFF $argv[1]
#$DBCMD $DBFF $argv[1]

$argv[1]

#rm -f $TEMPCMD

#
# wait to go away
#

#reset
#sleep 1
echo "********"
echo "$argv[1] terminated"
#echo -n "hit return to close window:"
#set a="$<"

exit 0


