From: Alessandro Arzilli Date: Sun, 13 May 2018 13:17:40 +0000 (+0200) Subject: cmd/link: writelines should keep is_stmt in sync with what it's writing X-Git-Tag: go1.11beta1~434 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3636d53c6119fd1b8a5f9e309fdf65c79952d398;p=gostls13.git cmd/link: writelines should keep is_stmt in sync with what it's writing For all functions but the last one if the function ends on a non-statement instruction the statement flag in debug_line is changed but is_stmt is not updated to match. Change-Id: I03c275c5e261ea672ce4da7baca2458810708326 Reviewed-on: https://go-review.googlesource.com/112979 Reviewed-by: David Chase --- diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go index 6232ab6e2f..9a75ad96f1 100644 --- a/src/cmd/link/internal/ld/dwarf.go +++ b/src/cmd/link/internal/ld/dwarf.go @@ -1302,6 +1302,7 @@ func writelines(ctxt *Link, lib *sym.Library, textp []*sym.Symbol, ls *sym.Symbo } if is_stmt == 0 && i < len(textp)-1 { // If there is more than one function, ensure default value is established. + is_stmt = 1 ls.AddUint8(uint8(dwarf.DW_LNS_negate_stmt)) } }