When using files with a symlink to a file with a different name, you have to use the GDB option 'basenames-may-differ'. Here's the related section from the GDB manual: ==== When processing file names provided by the user, GDB frequently needs to compare them to the file names recorded in the program’s debug info. Normally, GDB compares just the base names of the files as strings, which is reasonably fast even for very large programs. (The base name of a file is the last portion of its name, after stripping all the leading directories.) This shortcut in comparison is based upon the assumption that files cannot have more than one base name. This is usually true, but references to files that use symlinks or similar filesystem facilities violate that assumption. If your program records files using such facilities, or if you provide file names to GDB using symlinks etc., you can set basenames-may-differ to true to instruct GDB to completely canonicalize each pair of file names it needs to compare. This will make file-name comparisons accurate, but at a price of a significant slowdown. set basenames-may-differ Set whether a source file may have multiple base names. show basenames-may-differ Show whether a source file may have multiple base names. ====