aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug/dwarf/unit.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2014-01-27 10:18:22 -0800
committerIan Lance Taylor <iant@golang.org>2014-01-27 10:18:22 -0800
commitbd997b24f7a7cdb57bb9bf02fbfacef1f59f0f89 (patch)
tree8adc4fde3f6ef36658f005fd01fc809c1ad80f9b /src/pkg/debug/dwarf/unit.go
parente1a91c5b8963e3e02c897f96218d4eae17bcb740 (diff)
downloadgo-bd997b24f7a7cdb57bb9bf02fbfacef1f59f0f89.tar.xz
debug/dwarf, debug/elf: add support for reading DWARF 4 type info
In DWARF 4 the debug info for large types is put into .debug_type sections, so that the linker can discard duplicate info. This change adds support for reading type units. Another small change included here is that DWARF 3 supports storing the byte offset of a struct field as a formData rather than a formDwarfBlock. R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/56300043
Diffstat (limited to 'src/pkg/debug/dwarf/unit.go')
-rw-r--r--src/pkg/debug/dwarf/unit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/debug/dwarf/unit.go b/src/pkg/debug/dwarf/unit.go
index 270cd2e331..0fbc8e0825 100644
--- a/src/pkg/debug/dwarf/unit.go
+++ b/src/pkg/debug/dwarf/unit.go
@@ -66,7 +66,7 @@ func (d *Data) parseUnits() ([]unit, error) {
n = uint32(b.uint64())
}
vers := b.uint16()
- if vers != 2 && vers != 3 {
+ if vers != 2 && vers != 3 && vers != 4 {
b.error("unsupported DWARF version " + strconv.Itoa(int(vers)))
break
}