diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2016-10-06 11:46:26 +0200 |
---|---|---|
committer | Filip Tehlar <ftehlar@cisco.com> | 2016-10-06 11:46:26 +0200 |
commit | aea14fd0ac0868ee21b278695b2a5a17f6768141 (patch) | |
tree | 3674b0af231c8eec2f9f5b7d5f287d7ebdae0252 /tests/data_plane/vpp_lite_topo/utils/scripts/attach.sh | |
parent | 18b298a6096f95362c4f38270166f335790f4d0b (diff) |
Add a help script for attaching running vpp with gdb
Change-Id: I01baad5910a98f3ca8f764aca69aa7a564b19d05
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/utils/scripts/attach.sh')
-rwxr-xr-x | tests/data_plane/vpp_lite_topo/utils/scripts/attach.sh | 16 |
1 files changed, 16 insertions, 0 deletions
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 |