I deployed my cross-compiled file onto the Pluto SDR to run it as a standalone application. The Pluto SDR and libiio
are both quite intriguing, and I'm eager to gain a deeper understanding of their operation and explore them further, and step into the libiio functions to see the actual working flow.
I understand that libiio is organized as a shared library. In my project, I include the iio.h header file to utilize libiio. The header file provides the necessary api, and everything work well.
However, after cross-compiling my code and deploying it onto the Pluto SDR, I encountered an issue while trying to use gdbserver/gdb to trace the detailed execution flow. For example, I set a breakpoint in the iio_buffer_push() function, but when I attempt to step into this function to inspect its internal workings, I'm unable to do so, only get the information:
Single stepping until exit from function iio_buffer_push, which has no line number information.
To address this, I tried building libiio with debug information by running cmake .. -DCMAKE_BUILD_TYPE=Debug and cross-compiled my code with debug information with the lowest optimization level (-O0), using the following flags: -std=gnu99 -O0 -g -fno-inline -o mycode mycode.c -lpthread -liio -lm -Wall -Wextra -lrt. Despite these efforts, I still cannot step into the iio_buffer_push() function.
Could you please give me any suggestions? Thanks !!!
update more information
[edited by: pointer at 9:23 AM (GMT -4) on 21 Aug 2024]