From: Heschi Kreinick Date: Wed, 18 Oct 2017 18:29:21 +0000 (-0400) Subject: debug/dwarf: clarify StructField.ByteSize doc X-Git-Tag: go1.10beta1~666 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7b9d15d5665dc43256a5d6f79a307cc1ad728e2a;p=gostls13.git debug/dwarf: clarify StructField.ByteSize doc StructField.ByteSize is almost always unset; document that Type.Size() is the place to look. The dwarf package doesn't spend much effort teaching you DWARF, so I don't know what level of handholding is appropriate. Still, no harm in a little comment. Closes #21093 Change-Id: I0ed8cad2fa18e10a47d264ff16c176d603d6033c Reviewed-on: https://go-review.googlesource.com/71671 Run-TryBot: Heschi Kreinick TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- diff --git a/src/debug/dwarf/type.go b/src/debug/dwarf/type.go index 72ef816cc2..4352092ed0 100644 --- a/src/debug/dwarf/type.go +++ b/src/debug/dwarf/type.go @@ -154,7 +154,7 @@ type StructField struct { Name string Type Type ByteOffset int64 - ByteSize int64 + ByteSize int64 // usually zero; use Type.Size() for normal fields BitOffset int64 // within the ByteSize bytes at ByteOffset BitSize int64 // zero if not a bit field }