Commit Graph

1 Commits

Author SHA1 Message Date
aarzilli
3f9875e272 dwarf/line: fix some bugs with the state machine
Adds a test that compares the output of our state machine with the
output of the debug_line reader in the standard library and checks that
they produce the same output for the debug_line section of grafana as
compiled on macOS (which is the most interesting case since it uses cgo
and therefore goes through dsymutil).

A few bugs were uncovered and fixed:

1. is_stmt was reset improperly after a DW_LNS_end_sequence instruction
2. basic_block, prologue_end and epilogue_begin were not reset after a
   DW_LNS_copy instruction
3. some opcodes were not decoded properly if the debug_line section
   declares fewer standard opcodes than we know about.

Fixes #1282
2018-07-31 12:01:14 -07:00