aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug/dwarf/entry.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/entry.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/entry.go')
-rw-r--r--src/pkg/debug/dwarf/entry.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/debug/dwarf/entry.go b/src/pkg/debug/dwarf/entry.go
index c0c2889923..934416e6c1 100644
--- a/src/pkg/debug/dwarf/entry.go
+++ b/src/pkg/debug/dwarf/entry.go
@@ -387,3 +387,15 @@ func (r *Reader) SkipChildren() {
}
}
}
+
+// clone returns a copy of the reader. This is used by the typeReader
+// interface.
+func (r *Reader) clone() typeReader {
+ return r.d.Reader()
+}
+
+// offset returns the current buffer offset. This is used by the
+// typeReader interface.
+func (r *Reader) offset() Offset {
+ return r.b.off
+}