Michael Wild wrote: > On 2. Jul, 2010, at 9:46 , Mathias Lafeldt wrote: > >> Hello, >> >> is it possible to tell CMake to write relative source file paths in the >> debug information of an object file (aka .mdebug section)? >> >> Here's a sample object file: >> >> $ strings -a build/CMakeFiles/config.dir/src/strbuf.c.o | grep home >> /home/foo/bar/src/strbuf.c >> >> Instead of the absolute file path, I'd like to see "src/strbuf.c" or >> "strbuf.c". >> >> This is especially interesting when providing binaries that can be >> debugged by other people with different file paths. >> >> Maybe it's a special gcc option? >> >> Btw, CMAKE_USE_RELATIVE_PATHS doesn't do it. >> >> -Mathias > > > I never used it, but the GCC option -fdebug-prefix-map=old=new might be what > you need. But actually, that's the wrong list to ask ;-) > > HTH > > Michael
Though this option looks promising, my cross gcc version (3.2.2) doesn't support it. Thanks anyway. -Mathias _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
