summaryrefslogtreecommitdiff
path: root/ghc/utils/pvm/debugger.emacs
blob: ee053ca7b4e7d715620d3b1b7b0c8431b675ca5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/csh -f
#
#	debugger.csh
#
#	this script is invoked by the pvmd when a task is spawned with
#	the PvmTaskDebug flag set.  it execs an xterm with script
#	debugger2 running inside.
#
#	06 Apr 1993  Manchek
#

if ($#argv < 1) then
	echo "usage: debugger command [args]"
	exit 1
endif

# scratch file for debugger commands

set TEMPCMD=gdb$$.cmd
set TEMPLISP=gdb$$.el

# default debugger and flags

#
# run the debugger
#

echo run $argv[2-] > $TEMPCMD
echo "(gdb "'"'"$argv[1] -q -x $TEMPCMD"'")' > $TEMPLISP

emacs -l $TEMPLISP

#rm -f $TEMPCMD $TEMPLISP

exit 0