bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch for debugapp.in


From: Kazunobu Kuriyama
Subject: Patch for debugapp.in
Date: Fri, 28 Nov 2003 23:56:56 +0900
User-agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1

Hi,

This patch adds the switch --gui[=front_end] to debugapp so that
it can invokes gdb together with your favorite graphical front
end for gdb. The default value is set to ddd.

For example,

$ debugapp --gui <your_application>.debug

invokes gdb with ddd, whereas

$ debugapp --gui=xgdb <your_application>.debug

with xgdb.

Of course, gdb should be 6.0 or higher. Otherwise, a front end
won't display source lists correctly, and thus its use doesn't
make much sense.

I hope some people find it convenient.
--- debugapp.in.orig    2003-11-28 23:16:04.000000000 +0900
+++ debugapp.in 2003-11-28 23:29:47.000000000 +0900
@@ -39,10 +39,13 @@
 if [ -z "$GDB" ]; then
   GDB=gdb
 fi
+if [ -z "$DEFAULT_GRAPHICAL_FRONT_END" ]; then
+    DEFAULT_GRAPHICAL_FRONT_END=ddd
+fi
 
 case "$1" in
   --help)
-    echo usage: `basename "$0"` [--library-combo=...] application 
[arguments...]
+    echo usage: `basename "$0"` [--library-combo=...] [--gui[=front_end]] 
application [arguments...]
     echo
     echo [--library-combo=...] specifies a GNUstep backend to use.
     echo It overrides the default LIBRARY_COMBO environment variable.
@@ -50,6 +53,9 @@
     echo --library-combo=nx for NeXT OPENSTEP
     echo --library-combo=apple for Apple OSX
     echo
+    echo [--gui[=front_end]] specifies a graphical front end for GDB, e.g.
+    echo ddd or xgdb.  The default value is ddd.
+    echo
     echo application is the complete or relative name of the application
     echo program with the .app extension, like Edit.app.
     echo
@@ -65,6 +71,15 @@
     fi
     app="$2"; shift; shift
     ;;
+  --gui*)
+    GRAPHICAL_FRONT_END=`echo "$1" | sed 's/--gui//' | sed 's/^=//'`
+    if [ -z "$GRAPHICAL_FRONT_END" ]; then
+       GRAPHICAL_FRONT_END=$DEFAULT_GRAPHICAL_FRONT_END
+    fi
+    GDB=$GRAPHICAL_FRONT_END
+    app="$2"
+    shift; shift;
+    ;;
   *)
     app="$1"; shift;;
 esac

reply via email to

[Prev in Thread] Current Thread [Next in Thread]