It could make sense to double check an re-evaluate if this is all right. Original comment follows:
However, some source files are generated and reside in the build tree. So the mapping should be:
0-HOST_CFLAGS+=" -fdebug-prefix-map=${DISTSRC}/src=."
1+HOST_CFLAGS+=" -fdebug-prefix-map=${DISTSRC}=."
Otherwise, paths become inconsistent and problematic for configuring source remapping in the debugger:
0$ gdb ./bitcoin-fa37928536e0/libexec/bitcoin-node
1(gdb) break IsRoutable
2Breakpoint 1 at 0xb2aa40: file ./netaddress.cpp, line 463.
3(gdb) break mp::ProxyClient<ipc::capnp::messages::Init>::construct
4Breakpoint 2 at 0x5d82e0: file /distsrc-base/distsrc-fa37928536e0-x86_64-linux-gnu/build/src/ipc/capnp/init.capnp.proxy-client.c++, line 18.
Originally posted by @hebasto in #34281 (review)