Commit 3636d53c authored by Alessandro Arzilli's avatar Alessandro Arzilli Committed by David Chase

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/112979Reviewed-by: default avatarDavid Chase <drchase@google.com>
parent 6495bf17
......@@ -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))
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment