• Heschi Kreinick's avatar
    cmd/link: use . as DW_AT_comp_dir · 4a3d408d
    Heschi Kreinick authored
    Go's DWARF usually has absolute paths, in which case DW_AT_comp_dir
    doesn't matter. But the -trimpath flag produces relative paths, and
    then the spec says that they are relative to _comp_dir.
    
    There's no way to know what the "right" value of _comp_dir is without
    more user input, but we can at least leave the paths alone rather than
    making them absolute.
    
    After this change, Delve can find sources to a program built with
    -gcflags=-trimpath=$(pwd) as long as it's run in the right directory.
    
    Change-Id: I8bc7bed098e352d2c06800bfbbe14e8392e1bbed
    Reviewed-on: https://go-review.googlesource.com/78415
    Run-TryBot: Heschi Kreinick <heschi@google.com>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    4a3d408d
Name
Last commit
Last update
..
amd64 Loading commit data...
arm Loading commit data...
arm64 Loading commit data...
ld Loading commit data...
loadelf Loading commit data...
loadmacho Loading commit data...
loadpe Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
objfile Loading commit data...
ppc64 Loading commit data...
s390x Loading commit data...
sym Loading commit data...
x86 Loading commit data...