summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schaller <martin.schaller@it-schaller.de>2014-04-15 11:36:50 +0200
committerMartin Schaller <martin.schaller@it-schaller.de>2014-04-15 11:36:50 +0200
commit06583b9caca2792a82ef687e38a1a5798f283f1e (patch)
tree12cd4c723d0a18af9b3ee485eed252541b0809e9
parent41c5365a98a545579cffce47af4ba01bcb2377dd (diff)
downloadpoi-service-06583b9caca2792a82ef687e38a1a5798f283f1e.tar.gz
Added support for running within gdb for run script
-rwxr-xr-xsrc/navigation/script/run18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/navigation/script/run b/src/navigation/script/run
index fd1f0af..014c7ae 100755
--- a/src/navigation/script/run
+++ b/src/navigation/script/run
@@ -27,6 +27,7 @@
function run
{
local x=$xterm
+ local g=$gdb
local title="$1"
shift
if [ "$1" = "-n" ]
@@ -34,8 +35,17 @@ function run
shift
x=0
fi
+ if [ "$1" = -"g" ]
+ then
+ shift
+ g=0
+ fi
if [ "$x" = 1 ]
then
+ if [ "$g" = 1 ]
+ then
+ set -- gdb -ex run --args "$@"
+ fi
xterm -T "$title" -sb -sl 5000 -e "$@" &
else
"$@" &
@@ -50,13 +60,13 @@ function terminate
kill $PIDS
}
-
+gdb=0
xterm=0
enhpos=1
center="4612 N 0608 E"
BIN_DIR=$PWD/../bin
SRC_DIR=$PWD/..
-while getopts b:c:nx opt
+while getopts b:c:gnx opt
do
case $opt in
b)
@@ -79,6 +89,9 @@ do
;;
esac
;;
+ g)
+ gdb=1
+ ;;
n)
enhpos=0
;;
@@ -89,6 +102,7 @@ do
echo "Usage:"
echo "$0 [-a application][-c center][-lnx]"
echo "-c: Set center (supported values: paris,tokyo,longitude latitude). Default is geneve"
+ echo "-g: RUn subprocesses within gdb (only with -x)"
echo "-n: Don't start enhanced positioning service"
echo "-x: Run subprocesses in own xterm to get separated log messages"
exit 1