gdb annotations and other file-name displays can show the real path, not the path the user used to compile. There was an attempt to fix this in commit a0c1ffedc, but this had to be reverted due to bug#24915. This bug is a reminder to re-investigate this and find a better fix. Perhaps we can separate the concepts of the path used for matching and the path used for display; and also maybe add some caching.
Thank you Tom for resolving the issue in Bug#24915 before the 9.1 release. When this problem is revisited, I created a testcase that reproduces the regression in https://sourceware.org/ml/gdb-patches/2019-08/msg00421.html However, that only handled case of a single file - there is another case that could use a test Bug 24915 Comment 17.