diff options
| author | Alessandro Arzilli <alessandro.arzilli@gmail.com> | 2017-05-02 16:46:01 +0200 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2017-05-18 23:10:50 +0000 |
| commit | 2ad41a30906ca1d0736f7efc40da60cb519a9f89 (patch) | |
| tree | 6b9c06e71157988d6c324ec005fb2fb87e9a5b6b /src/cmd/internal/objabi | |
| parent | 0f0a51f1d12bb009034a38c69aa786ba62ca41e2 (diff) | |
| download | go-2ad41a30906ca1d0736f7efc40da60cb519a9f89.tar.xz | |
cmd/compile: output DWARF lexical blocks for local variables
Change compiler and linker to emit DWARF lexical blocks in .debug_info
section when compiling with -N -l.
Version of debug_info is updated from DWARF v2 to DWARF v3 since
version 2 does not allow lexical blocks with discontinuous PC ranges.
Remaining open problems:
- scope information is removed from inlined functions
- variables records do not have DW_AT_start_scope attributes so a
variable will shadow other variables with the same name as soon as its
containing scope begins, even before its declaration.
Updates #6913.
Updates #12899.
Change-Id: Idc6808788512ea20e7e45bcf782453acb416fb49
Reviewed-on: https://go-review.googlesource.com/40095
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'src/cmd/internal/objabi')
| -rw-r--r-- | src/cmd/internal/objabi/symkind.go | 1 | ||||
| -rw-r--r-- | src/cmd/internal/objabi/symkind_string.go | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/internal/objabi/symkind.go b/src/cmd/internal/objabi/symkind.go index 62a7efd964..b037e9e4ed 100644 --- a/src/cmd/internal/objabi/symkind.go +++ b/src/cmd/internal/objabi/symkind.go @@ -56,4 +56,5 @@ const ( STLSBSS // Debugging data SDWARFINFO + SDWARFRANGE ) diff --git a/src/cmd/internal/objabi/symkind_string.go b/src/cmd/internal/objabi/symkind_string.go index aabcfd2d54..5123dc7097 100644 --- a/src/cmd/internal/objabi/symkind_string.go +++ b/src/cmd/internal/objabi/symkind_string.go @@ -4,9 +4,9 @@ package objabi import "fmt" -const _SymKind_name = "SxxxSTEXTSRODATASNOPTRDATASDATASBSSSNOPTRBSSSTLSBSSSDWARFINFO" +const _SymKind_name = "SxxxSTEXTSRODATASNOPTRDATASDATASBSSSNOPTRBSSSTLSBSSSDWARFINFOSDWARFRANGE" -var _SymKind_index = [...]uint8{0, 4, 9, 16, 26, 31, 35, 44, 51, 61} +var _SymKind_index = [...]uint8{0, 4, 9, 16, 26, 31, 35, 44, 51, 61, 72} func (i SymKind) String() string { if i >= SymKind(len(_SymKind_index)-1) { |
