New comment by oreo639 on void-packages repository https://github.com/void-linux/void-packages/issues/49207#issuecomment-1986998038 Comment: This issue is labeled as gdb not being able to step inside libstdc++ (which occurs per-instruction), but your issue appears to be that the file paths shown are the ones from build time? Am I misunderstanding? (stepping, either per-instruction, or per function doesn't require the presence of the source files, the source files are just so it can display the line of code for you) Showing `/usr/include/c++/13.2/bits/basic_string.h` would not be correct in this instance since the debug symbols can also point to cpp files. The correct generalized path would be smth like `/usr/sources/libstdc++/...` which isn't supported by void since we don't have `-src` packages. gdb supports a substitute path for this purpose: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Source-Path.html#set-substitute_002dpath > suggested on `#voidlinux` that `gcc`'s template might have `-ffile-prefix-map` missing. This is likely the solution to this problem. The opposite is the case, the `-ffile-prefix-map` is getting passed and is set up such that the wrksrc is replaced with `./`. https://github.com/void-linux/void-packages/blob/7771ef865fa7b5312892b8c53dbfbc459cfdfd41/common/environment/configure/debug-debug-prefix-map.sh#L12-L13