Closed
Description
In gcc & clang, the flag -fdebug-prefix-map=old=new
allows changing the prefix of source files referred to in debug information.
Related to #34902, this allows one to avoid having the particular source directory that a file was built in affect the output object/executable/library contents.
It also allows source-level debugging to work in cases where the source code is installed by the debug packages to a location that differs from where it was built (debian & OpenEmbedded, at least, take advantage of this).
As an alternate, the program debugedit
allows modifying the files after generation to adjust the paths (as far as I can tell, Fedora uses this, and potentially other rpm based distros).