This libgo patch fixes the handling of LineSetFile aka DW_LNS_set_file
in DWARF line info. The DWARF number is one-based, but I am using it to
index into a zero-based array. Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch.
Ian
diff -r dd8c9c38c8c7 libgo/go/debug/dwarf/line.go
--- a/libgo/go/debug/dwarf/line.go Tue May 15 17:25:30 2012 -0700
+++ b/libgo/go/debug/dwarf/line.go Tue May 15 22:33:39 2012 -0700
@@ -359,7 +359,7 @@
b.error("DWARF file number out of range")
return
}
- lineInfo.Filename = hdr.files[i]
+ lineInfo.Filename = hdr.files[i-1]
newLineInfo = true
case LineSetColumn:
lineInfo.Column = int(b.uint())