Modified: freeswitch/trunk/support-d/fscore_pb (14953 => 14954)
--- freeswitch/trunk/support-d/fscore_pb 2009-09-23 13:17:36 UTC (rev 14953)
+++ freeswitch/trunk/support-d/fscore_pb 2009-09-23 15:33:05 UTC (rev 14954)
@@ -1,11 +1,11 @@
-core=`ls -rt core.*`
+core=`ls -rt core.* 2> /dev/null`
if [ -z "$core" ] ; then
- core=`ls -rt core`
+ core=`ls -rt core 2> /dev/null`
fi
if [ -z "$core" ] ; then
- core=`ls -rt freeswitch.core`
+ core=`ls -rt freeswitch.core 2> /dev/null`
fi
if [ -z "$core" ] ; then
@@ -13,6 +13,12 @@
exit 255
fi
+if [ -z "which gdb" ] ; then
+ echo "Unable to locate gdb, is it installed?"
+ exit 255
+fi
+
+
line="--------------------------------------------------------------------------------"
mypwd=`pwd`
@@ -55,7 +61,7 @@
echo "GDB BACKTRACE:" >> $post_file
echo $line >> $post_file
-gdb /usr/local/freeswitch/bin/freeswitch `ls -rt core.* | tail -n1` \
+gdb /usr/local/freeswitch/bin/freeswitch `echo $core | tail -n1` \
--eval-command="echo \n\n" \
--eval-command="set pagination off" \
--eval-command="echo Stack Trace\n" \
@@ -85,7 +91,3 @@
mv $post_file $tmpdir
echo "Finished."
echo "Please report http://pastebin.freeswitch.org/$pb to the developers."
-
-
-
-