https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
So, for example, suppose you ask GDB to debug /usr/bin/ls, which has a
debug link that specifies the file ls.debug, and a build ID whose value
in hex is abcdef1234. If the list of the global debug directories
includes /usr/lib/debug, then GDB will look for the following debug
information files, in the indicated order:
- /usr/lib/debug/.build-id/ab/cdef1234.debug
- /usr/bin/ls.debug
- /usr/bin/.debug/ls.debug
- /usr/lib/debug/usr/bin/ls.debug.