]> Cypherpunks repositories - gostls13.git/commit
debug/dwarf: add Entry.AttrField method to get *Field by Attr
authorAustin Clements <austin@google.com>
Mon, 6 Apr 2015 22:01:45 +0000 (18:01 -0400)
committerAustin Clements <austin@google.com>
Sun, 12 Apr 2015 14:38:00 +0000 (14:38 +0000)
commit947b6a7ec8e05edbc4fe6fc6b4002fa03efc7329
tree0be2c40819b6c865a85871146169d271fecd1b22
parentd7d133736888f011c7746ff6edb3cb90c6cf0309
debug/dwarf: add Entry.AttrField method to get *Field by Attr

Currently, Entry has a Val method that looks up an attribute and
returns its value. Now that Field has more fields than the attribute
and its value, it's useful to return the whole Field and let the
caller retrieve the parts it needs.

This change adds an AttrField method to Entry that does the same
lookup at Val, but returns the whole *Field rather than just the
value.

Change-Id: Ic629744c14c0e09d7528fa1026b0e1857789948c
Reviewed-on: https://go-review.googlesource.com/8503
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/debug/dwarf/entry.go