Commit eebfbd58 authored by Lionel Gauthier's avatar Lionel Gauthier

better gdb handling

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5680 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 30353d57
...@@ -179,12 +179,12 @@ then ...@@ -179,12 +179,12 @@ then
else else
OBJ_DIR=`basename $OBJ_DIR` OBJ_DIR=`basename $OBJ_DIR`
fi fi
if [ ! -f $OBJ_DIR/Makefile ] if [ ! -n "m4" ]
then then
if [ ! -n "m4" ]
then
mkdir -m 777 m4 mkdir -m 777 m4
fi fi
if [ ! -f $OBJ_DIR/Makefile ]
then
autoreconf -i autoreconf -i
echo_success "Invoking autogen" echo_success "Invoking autogen"
bash_exec "./autogen.sh" bash_exec "./autogen.sh"
...@@ -241,6 +241,7 @@ fi ...@@ -241,6 +241,7 @@ fi
####################################################### #######################################################
rm -f /tmp/source.txt rm -f /tmp/source.txt
VARIABLES=" VARIABLES="
GNU_DEBUGGER\|\
ENB_INTERFACE_NAME_FOR_S1_MME\|\ ENB_INTERFACE_NAME_FOR_S1_MME\|\
ENB_IPV4_ADDRESS_FOR_S1_MME\|\ ENB_IPV4_ADDRESS_FOR_S1_MME\|\
ENB_INTERFACE_NAME_FOR_S1U\|\ ENB_INTERFACE_NAME_FOR_S1U\|\
...@@ -352,6 +353,17 @@ wait_process_started tshark ...@@ -352,6 +353,17 @@ wait_process_started tshark
cd $OPENAIRCN_DIR/$OBJ_DIR cd $OPENAIRCN_DIR/$OBJ_DIR
echo "GNU_DEBUGGER:"$GNU_DEBUGGER
gdb --args $OPENAIRCN_DIR/$OBJ_DIR/OAI_EPC/oai_epc -K $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$ITTI_LOG_FILE -c $THIS_SCRIPT_PATH/$CONFIG_FILE_EPC 2>&1 | tee $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$STDOUT_LOG_FILE
if [ "x$GNU_DEBUGGER" == "xyes" ]; then
echo_success "Running with GDB"
touch .gdbinit
echo "file $OPENAIRCN_DIR/$OBJ_DIR/OAI_EPC/oai_epc" > .gdbinit
echo "set args -K $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$ITTI_LOG_FILE -c $THIS_SCRIPT_PATH/$CONFIG_FILE_EPC" >> .gdbinit
echo "run" >> .gdbinit
gdb 2>&1 | tee $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$STDOUT_LOG_FILE
else
echo_success "Running without GDB"
$OPENAIRCN_DIR/$OBJ_DIR/OAI_EPC/oai_epc -K $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$ITTI_LOG_FILE -c $THIS_SCRIPT_PATH/$CONFIG_FILE_EPC 2>&1 | tee $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$STDOUT_LOG_FILE
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment