commit | 58f017bcea3d2f3dbb898ba175fe09beb32b4eb6 | [log] [tgz] |
---|---|---|
author | Than McIntosh <thanm@google.com> | Fri May 29 16:01:08 2020 -0400 |
committer | Than McIntosh <thanm@google.com> | Wed Jun 03 14:08:41 2020 +0000 |
tree | 818859cff43f6f1675e98dd99dc0c3a6dfdcb653 | |
parent | 9326d71874730901c159643703a16dc34646e5bd [diff] |
cmd/{compile,link}: fix problem with DWARF end_sequence ops During DWARF line table emission in the linker, prior to issuing a DW_LNE_end_sequence op to mark the end of the line table for a compilation unit, advance the PC to produce an address beyond the last text address in the unit (this is required by the DWARF standard). Because of the way that GDB interprets end-sequence ops, we were effectively losing the last row in the line table for each unit, which degraded the debugging experience. This problem has been around for a while, but has surfaced recently due to changes in line table generation. Prior to Go 1.14, the DWARF line table was emitted entirely in the linker, and a single monolithic line table was created for each Go package (including functions from assembly). In 1.14 we moved to having the compiler emit line table fragments for each function, and having the linker stitch together the fragments. As part of this change we moved to a model in which each "go tool compile/asm" output has its own DWARF line table instance, meaning that there are many more "end sequence" ops, which made the problem more visible. Fixes #38192. Change-Id: Ic29e2f6e0ac952360c81fcba5268ad70b2b44184 Reviewed-on: https://go-review.googlesource.com/c/go/+/235739 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.