DWARF Standard


171130.2 Thomas Anderson Allow $ORIGIN in DW_AT_comp_dir Enhancement Open

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.

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

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2017 by DWARF Standards Committee.