]> Cypherpunks repositories - gostls13.git/commit
debug/dwarf: expose CU byte order
authorAustin Clements <austin@google.com>
Wed, 21 Aug 2019 19:05:26 +0000 (15:05 -0400)
committerAustin Clements <austin@google.com>
Wed, 18 Sep 2019 19:08:45 +0000 (19:08 +0000)
commitbc40294d47f100b6da4b21823cf85d11ce931c1b
treef76ab0aecd797c684da96cd54ae7b30a741346fc
parent582d5194faec20c475ab93b45cf0520253dec4a9
debug/dwarf: expose CU byte order

Currently, dwarf.Reader exposes the current compilation unit's address
size, but doesn't expose its byte order. Both are important for
decoding many attributes. For example, location descriptions include
addresses that are encoded in native form for the CU.

This CL exposes the byte order of the compilation unit in the same way
we already expose its address size, which makes it possible to decode
attributes containing native addresses.

Change-Id: I92f156818fe92b049d1dfc1613816bb1689cfadf
Reviewed-on: https://go-review.googlesource.com/c/go/+/192698
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/debug/dwarf/entry.go
src/debug/dwarf/entry_test.go