i am just wondering if i can tell gcc to embed the absolute path to a source file in the debug information, even if i call gcc like
gcc -g ../src/somecode.c -o ../bin/somecode.o
as i see it atm, gcc just stores what you provide, so if you provide a relative path, at the end, gdb only knows the relative path as well.
is there a way to bypass that without using absolute paths while compiling? like: let gcc lookup the complete path?
thanks in advance rTi
gcc -fdebug-prefix-map=..=$(readlink -f ..)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With