Then it's behaving as expected. Since you're using a system-provided compiler, the debuginfo refers to files installed on the builder when the package was originally built, not to what's currently installed on your machine.
Indeed. If you download files (that were compiled with FPC) wich have debug info in them, then the debug info contains the full path of the sources were they were on the system of the person (or tool) that did this build.
So the packages were build on some system that had this folder. The compiler added the full path, the IDE sees that, and gets confused....
Trying gdb may or may not help, because it may (or may not) expose a different "part" of the debug info.
I.e. the debug info stores the full path, but usually in 2 parts (something internal). And depending on how/if those splitted parts are returned in full or not, results may vary.... Though, not sure it will help.
You could also try in
Tools > Options > Debugger > General: "Additional search path" to add the path of your sources.
Mind you for "/builddir/build/BUILD/fpc-3.2.2-build/fpcbuild-3.2.2/fpcsrc/rtl/inc/system.inc"
you may have to either give the path to
/your/fpcsrc
/your/fpcsrc/rtl
But most likely NOT the inc.
IIRC, there is actually an issue in the current IDE, that it has problems finding "*.inc" files, if they are in sub-dirs (or something like this, I have not yet had time to figure out the details / afaik something in codetools or packager / or directory cache ... in anyway outside my usual comfort zone).
This may also be why the incorrect debug info of prebuild LCL don't always cause the same issue, even though they too may have wrong pathes. But then the IDE should see the partial path, and find that, relative to its installation.... Only it doesn't do that with the fpc sources (or some of them).... I have seen it happen too, but as I said, not yet had the time to fully dig through it.