]> Cypherpunks repositories - gostls13.git/commit
debug/dwarf: add support for line tables
authorAustin Clements <austin@google.com>
Wed, 4 Mar 2015 01:57:10 +0000 (20:57 -0500)
committerAustin Clements <austin@google.com>
Tue, 10 Mar 2015 02:32:42 +0000 (02:32 +0000)
commit339300926774c9e4868a04d1362c98b19706c7d1
tree164b7e2047f1cafef60335a69a6c61ae73ad3393
parent0e31b4ed2646b2330aad33b959a527c1bbfe6b11
debug/dwarf: add support for line tables

This implements a LineReader for line tables that parallels the
existing Reader for debug entries.

This code is partly based on the debug subrepo's fork of dwarf, but it
is a more complete (and, I believe, correct) implementation of the
spec and exposes a more general API.  While the debug subrepo's
implementation exposed only a PC-to-line function, this version
exposes the line table rows to the caller.  This way the caller can
make its own trade-offs when implementing PC-to-line (or line-to-PC),
such as whether or not to build an index for fast lookup.

Change-Id: Ie157bc817f55e940b6f2e1ae010c5a4e1f29c5c8
Reviewed-on: https://go-review.googlesource.com/6734
Reviewed-by: Nigel Tao <nigeltao@golang.org>
src/debug/dwarf/const.go
src/debug/dwarf/line.go [new file with mode: 0644]