• Than McIntosh's avatar
    cmd/compile: avoid truncating fieldname var locations · d80e8de5
    Than McIntosh authored
    Don't include package path when creating LSyms for auto and param
    variables during Prog generation, and update the DWARF emit routine
    accordingly (remove the code that chops off package path from names in
    DWARF var location expressions). Implementation suggested by mdempsky@.
    
    The intent of this change is to have saner location expressions in cases
    where the variable corresponds to a structure field. For example, the
    SSA compiler's "decompose" phase can take a slice value and break it
    apart into three scalar variables corresponding to the fields (slice "X"
    gets split into "X.len", "X.cap", "X.ptr"). In such cases we want the
    name in the location expression to omit the package path but preserve
    the original variable name (e.g. "X").
    
    Fixes #16338
    
    Change-Id: Ibc444e7f3454b70fc500a33f0397e669d127daa1
    Reviewed-on: https://go-review.googlesource.com/31819
    Run-TryBot: Than McIntosh <thanm@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    d80e8de5
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...