I have just resolved the same problem, hope it's not too late for you.
Firs of all, you should enable debug information, i.e. compile with -g
option:
icpc -g -o output source.cpp
or
gcc -g -o output source.cpp
if you prefer GNU compiler.
Another step (non-trivial) was found here: it says that at least for Ubuntu you have to type in:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
This operation helped me and I hope it will help you and other people who face with this issue in future.