bombela / backward-cpp

A beautiful stack trace pretty printer for C++
MIT License
3.68k stars 467 forks source link

Support separate debug symbol files (as in GDB) #253

Open alexezeder opened 2 years ago

alexezeder commented 2 years ago

backward-cpp already supports loading debug symbols from a separate file. But currently, a separate file with debug symbols has to be located in the current working directory while the GDB documentation says:

For the “debug link” method, GDB looks up the named file in the directory of the executable file, then in a subdirectory of that directory named .debug, and finally under each one of the global debug directories, in a subdirectory whose name is identical to the leading directories of the executable’s absolute file name.

This way, we have to look for a separate debug symbols file differently to replicate GDB behavior.

There are also a few points that I explained inline.