~zulcss/samba/server-dailies-3.4

« back to all changes in this revision

Viewing changes to selftest/gdb_run

  • Committer: Chuck Short
  • Date: 2010-09-28 20:38:39 UTC
  • Revision ID: zulcss@ubuntu.com-20100928203839-pgjulytsi9ue63x1
Initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
ENV="$1"
 
4
 
 
5
shift 1
 
6
 
 
7
if test -z "$TMPDIR"; then
 
8
        TMPDIR="/tmp"
 
9
fi
 
10
 
 
11
TMPFILE=$TMPDIR/gdb_run.$$
 
12
cat << EOF  > $TMPFILE
 
13
run
 
14
bt
 
15
EOF
 
16
 
 
17
trap "/bin/rm -f $TMPFILE" EXIT
 
18
CMD="gdb -x $TMPFILE --args $@"
 
19
echo $CMD
 
20
eval $ENV "$CMD"