gcc/gdb: How to embed absolute path to source file in debug information?

早过忘川 提交于 2019-12-04 04:24:35
gcc -fdebug-prefix-map=..=$(readlink -f ..)

What platform are you building for and what is the native debugging format for that platform? Not that this information will necessarily get you closer to solving your problem, but it may be worth looking at the specification for the debug format to see if what you want to do even makes sense from that perspective.

You are passing the '-g' option to the compiler right.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!