mirror of
https://github.com/golang/go
synced 2024-11-17 22:14:43 -07:00
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 <drchase@google.com>
This commit is contained in:
parent
6495bf1710
commit
3636d53c61
@ -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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user