]> Cypherpunks repositories - gostls13.git/commit
debug/dwarf: compute ByteSize for more DWARF types
authorJohn Dethridge <jcd@golang.org>
Sat, 2 May 2015 06:40:21 +0000 (16:40 +1000)
committerJohn Dethridge <jcd@golang.org>
Thu, 7 May 2015 07:28:39 +0000 (07:28 +0000)
commitd0a05f51f9d50622868df5e6032f40896b448426
tree2bff1298798f322f15040187dca0b1e0108849df
parentc3559f16211888477fc60e348d1dadde9623ba7f
debug/dwarf: compute ByteSize for more DWARF types

When AttrByteSize is not present for a type, we can still determine the
size in two more cases: when the type is a Typedef referring to another
type, and when the type is a pointer and we know the default address
size.

entry.go: return after setting an error if the offset is out of range.

Change-Id: I63a922ca4e4ad2fc9e9be3e5b47f59fae7d0eb5c
Reviewed-on: https://go-review.googlesource.com/9663
Reviewed-by: Austin Clements <austin@google.com>
src/debug/dwarf/entry.go
src/debug/dwarf/type.go
src/debug/dwarf/typeunit.go