[kaffe] KAFFE_DEBUG support for cgdb

M.Negovanovic milosn@xtra.co.nz
Mon Jan 5 19:12:02 2004


--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

this small patch adds support for cgdb(vi based curses frontend for gdb)
to kaffe's startup script through KAFFE_DEBUG env. variable.


--- CHANGELOG ---

2004-01-06  Milos Negovanovic <milosn@xtra.co.nz>
	* kaffe/scripts/kaffe.in:
	Add support for cgdb(vi based curses frontend for gdb).

--- CHANGELOG ---

Regards
Milos

--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kaffe.in.diff"

--- kaffe_orig/kaffe/scripts/kaffe.in	2004-01-06 14:54:01.000000000 +1300
+++ kaffe/kaffe/scripts/kaffe.in	2004-01-06 15:18:08.000000000 +1300
@@ -96,7 +96,7 @@
     KAFFE_DEBUG_TEMPFILE=`@MKTEMP@ /tmp/kaffe.XXXXXX` || exit 1
 
     case `"$KAFFE_DEBUG" --version </dev/null 2>/dev/null` in
-    *"GDB"* | *"GNU gdb"*)
+    "GDB"* | "GNU gdb"*)
 	# start command-line gdb within the correct working directory,
 	# and set up the specified argument list
 	{
@@ -125,7 +125,17 @@
 	# start gdb within XEmacs, move into the current working
 	# directory and set up the specified argument list
 	exec "$KAFFE_DEBUG" -eval "(progn (gdb \"$KAFFE_JREBINDIR/@kaffebin_TRANSF@\") (gdb-call \"cd `pwd`\") (gdb-call \"set args $*\"))";;
-    *) echo you must set KAFFE_DEBUG to either emacs, gdb or ddd >&2;;
+    CGDB*)
+	# start gdb within cgdb, move into the current working
+	# directory and set up the specified argument list
+	{
+	    echo "shell rm -f $KAFFE_DEBUG_TEMPFILE"
+	    echo "cd `pwd`"
+	    echo "set args $*"
+	} > $KAFFE_DEBUG_TEMPFILE
+	exec "$KAFFE_DEBUG" -x $KAFFE_DEBUG_TEMPFILE $KAFFE_JREBINDIR/kaffe-bin
+	rm -f $KAFFE_DEBUG_TEMPFILE ;;
+    *) echo you must set KAFFE_DEBUG to either emacs, gdb, ddd or cgdb >&2;;
     esac
 fi
 exit 1

--8t9RHnE3ZwKMSgU+--