• Austin Clements's avatar
    debug/dwarf: add support for line tables · 33930092
    Austin Clements authored
    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/6734Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
    33930092
const.go 14.7 KB