I’ve been debugging a program which uses certain library on CLion. The IDE is great, but I cannot see most of the code from the library, the debugger shows me assembly code, and that’s not very helpful. The solution was to build and install the library with debugging symbols:
cmake -DCMAKE_BUILD_TYPE=Debug .
make && make install
The actual commands for my particular case were:
git clone https://github.com/aws/aws-encryption-sdk-c.git
mkdir build-aws-encryption-sdk-c && cd build-aws-encryption-sdk-c
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON ../aws-encryption-sdk-c
make && sudo make install ; cd ..
With these changes, CLion can show me the code from the library, which is great. I hope it helps.