How do I debug a gst-launch-1.0 pipeline using gdb?

To get relevant functions to add as breakpoint you can run this code to parse your .so file.
nm -C --defined-only your_so_file.so | grep ' T '

For example, for debugging the detection post process function.
Run this to get the post process available functions:
nm -C --defined-only $TAPPAS_WORKSPACE/apps/h8/gstreamer/libs/post_processes//libyolo_hailortpp_post.so | grep ' T '

The expected output is:
0000000000010200 T filter
000000000000fcd0 T yolov5
00000000000107b0 T yolov5m_vehicles
0000000000010ce0 T yolov5_no_persons
0000000000010290 T yolox
000000000000f600 T common::nms(std::vector<HailoDetection, std::allocator >&, float, bool)
0000000000008950 T common::iou_calc(HailoBBox const&, HailoBBox const&)

You can use the ‘yolov5’ to set a break point.

Note that debugging full CPP / Python applications running Gstreamer can be done using more sophisticated tools like VSCode.
If your symbols or code are not human readable make sure you compile it in debug mode.
To compile TAPPAS code in debug mode use:
$TAPPAS_WORKSPACE/scripts/gstreamer/install_hailo_gstreamer.sh --build-mode debug

3 Likes