• Heschi Kreinick's avatar
    cmd/compile: emit DW_AT_decl_line · 4a1be1e1
    Heschi Kreinick authored
    Some debuggers use the declaration line to avoid showing variables
    before they're declared. Emit them for local variables and function
    parameters.
    
    DW_AT_decl_file would be nice too, but since its value is an index
    into a table built by the linker, that's dramatically harder. In
    practice, with inlining disabled it's safe to assume that all a
    function's variables are declared in the same file, so this should still
    be pretty useful.
    
    Change-Id: I8105818c8940cd71bc5473ec98797cce2f3f9872
    Reviewed-on: https://go-review.googlesource.com/44350Reviewed-by: default avatarDavid Chase <drchase@google.com>
    4a1be1e1
dwarf.go 20.8 KB