From: Florin Coras Date: Mon, 10 Oct 2016 10:54:29 +0000 (+0000) Subject: Merge "Add a help script for attaching running vpp with gdb" X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=1db8c38a6fa7fc692fe18bbd47eb2f87ec6b143b;hp=abc6884972bc0792f4817a3822f13128d716c889;p=one.git Merge "Add a help script for attaching running vpp with gdb" --- diff --git a/tests/data_plane/vpp_lite_topo/config.sh b/tests/data_plane/vpp_lite_topo/config.sh index 57b616a..a4709f0 100644 --- a/tests/data_plane/vpp_lite_topo/config.sh +++ b/tests/data_plane/vpp_lite_topo/config.sh @@ -4,7 +4,8 @@ ODL_IP="127.0.0.1" ODL_PORT="8181" # path to vpp executable -VPP_LITE_BIN=/vpp/build-root/install-vpp_lite_debug-native/vpp/bin/vpp +VPP_LITE_DIR=/vpp/build-root/install-vpp_lite_debug-native/vpp/bin +VPP_LITE_BIN=${VPP_LITE_DIR}/vpp VPP_API_TEST=/vpp/build-root/install-vpp_lite_debug-native/vpp-api-test/bin/vpp_api_test # read user config file if exists diff --git a/tests/data_plane/vpp_lite_topo/utils/scripts/attach.sh b/tests/data_plane/vpp_lite_topo/utils/scripts/attach.sh new file mode 100755 index 0000000..0b87085 --- /dev/null +++ b/tests/data_plane/vpp_lite_topo/utils/scripts/attach.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Help script for attaching running vpp +# +# Currently his sctipt waits for second vpp pid + +pid="" + +cd ${VPP_LITE_DIR} + +while [ "$pid" == "" ] ; do + pid=$(pidof vpp | awk '{print $2}') +done + +echo "attached to $pid" +gdb attach $pid -ex cont