• Robert Griesemer's avatar
    cmd/compile: fix recorded export data position info · 2123a6c6
    Robert Griesemer authored
    The position information recorded now consists of the line-
    directive relative filename and line number. It would be
    relatively easy to also encode absolute position information
    as necessary (by serializing src.PosBase data).
    
    For example, given $GOROOT/src/tmp/x.go:
    
    	package p
    
    	const C0 = 0
    
    	//line c.go:10
    	const C1 = 1
    
    	//line t.go:20
    	type T int
    
    	//line v.go:30
    	var V T
    
    	//line f.go:40
    	func F() {}
    
    The recorded positions for the exported entities are:
    
    	C0 $GOROOT/src/tmp/x.go 3
    	C1 c.go 10
    	T t.go 20
    	V v.go 30
    	F f.go 40
    
    Fix verified by manual inspection. There's currently no easy way
    to test this, but it will eventually be tested when we fix #7311.
    
    Fixes #19391.
    
    Change-Id: I6269067ea58358250fe6dd1f73bdf9e5d2adfe3d
    Reviewed-on: https://go-review.googlesource.com/37936Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    2123a6c6
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...