[asterisk-commits] tzafrir: branch group/zapata_conf r84888 - /team/group/zapata_conf/contrib/sc...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 6 19:58:37 CDT 2007


Author: tzafrir
Date: Sat Oct  6 19:58:36 2007
New Revision: 84888

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84888
Log:
Support runinng the live asterisk in gdb .

Modified:
    team/group/zapata_conf/contrib/scripts/live_ast

Modified: team/group/zapata_conf/contrib/scripts/live_ast
URL: http://svn.digium.com/view/asterisk/team/group/zapata_conf/contrib/scripts/live_ast?view=diff&rev=84888&r1=84887&r2=84888
==============================================================================
--- team/group/zapata_conf/contrib/scripts/live_ast (original)
+++ team/group/zapata_conf/contrib/scripts/live_ast Sat Oct  6 19:58:36 2007
@@ -31,6 +31,8 @@
 
 BASE_DIR=$PWD/live
 AST_CONF=$BASE_DIR/etc/asterisk/asterisk.conf
+AST_BIN=$BASE_DIR/usr/sbin/asterisk
+GDB_INIT=$BASE_DIR/gdbinit
 
 case "$1" in
 install)
@@ -49,16 +51,23 @@
 astspooldir  => $BASE_DIR/var/spool/asterisk
 astlogdir    => $BASE_DIR/var/log/asterisk
 EOF
+  cat <<EOF >$GDB_INIT
+set args -C $AST_CONF -c
+EOF
   ;;
 run)
   shift
-  $BASE_DIR/usr/sbin/asterisk -C $AST_CONF "$@"
+  $AST_BIN -C $AST_CONF "$@"
+  ;;
+gdb)
+  gdb -x $GDB_INIT $AST_BIN
   ;;
 *)
   echo "$0: Usage:        Equivalent of:"
   echo "$0 install        make install"
   echo "$0 samples        make samples"
   echo "$0 run [params]   asterisk [params]"
+  echo "$0 gdb            gdb asterisk"
   exit 1
   ;;
 esac




More information about the asterisk-commits mailing list