|
DWARF Standard
|
171130.2 |
Thomas Anderson |
Allow $ORIGIN in DW_AT_comp_dir |
Enhancement |
Rejected |
Caroline Tice |
Section .debug_abbrev, pg 64
Similar to how $ORIGIN can be used in RPATH to indicate the directory containing
the executable, DWARF should allow $ORIGIN in DW_AT_comp_dir.
Rationale:
When compiling with -gsplit-dwarf, DW_AT_comp_dir is an absolute path by default.
This means if you move or rename your build directory, DW_AT_comp_dir will be invalid.
This issue can be partially avoided using a relative path, but moving the build
directory is still problematic, and this would also cause gdb to fail to find
debugging information when it is launched from outside your build directory.
This enhancement is motivated by Chromium bug [1], in which developers were getting
gdb errors of the form "Could not find DWO CU".
[1] https://crbug.com/603286
--
06/14/21 -- Rejected. This appears to be a debugger implementation issue,
where the debugger can be told by the user where to find the build directory.