The current documentation doesn't explain what the option is for, or how one might use it. The attached patch expands the documentation a bit to try to explain this.
Tested with a make doc, and verifying that the gcc.info file looks OK. And tested by verifying that the option works the way I think it does.. OK? Jim
2017-10-25 Jim Wilson <wil...@tuliptree.org> gcc/ * doc/invoke.texi (-fdebug-prefix-map): Expand documentation. Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 254023) +++ gcc/doc/invoke.texi (working copy) @@ -6981,7 +6981,12 @@ link processing time. Merging is enabled by defau @item -fdebug-prefix-map=@var{old}=@var{new} @opindex fdebug-prefix-map When compiling files in directory @file{@var{old}}, record debugging -information describing them as in @file{@var{new}} instead. +information describing them as in @file{@var{new}} instead. This can be +used to replace a build time path with an install time path in the debug info. +It can also be used to change an absolute path to a relative path by using +@file{.} for @var{new}. This can give more reproducible builds, which are +location independent, but may require an extra command to tell gdb where to +find the source files. @item -fvar-tracking @opindex fvar-tracking