Skip to content
  • Alessandro Arzilli's avatar
    Go 1.8 compatibility (part 2) (#667) · 8724b3fc
    Alessandro Arzilli authored and Derek Parker's avatar Derek Parker committed
    * dwarf/line: bugfix: not all values of the state machine can be used
    
    According to DWARF Version 3 Section 6.2 "Line Number Information" not
    all the values transversed by the line numbers state machine are valid
    instructions, only the ones after a "special opcode", after the
    standard opcode DW_LNS_copy and the extended opcode
    DW_LINE_end_sequence.
    
    DWARF3 describes this by specifying that only the opcodes listed above
    "append a row to the matrix".
    
    Additionally the implementation of DW_LNS_const_add_pc was wrong.
    
    Fixes #664
    
    * dwarf/line: fixed test failing with go1.8
    
    * service/test: fix prologue detection tests
    
    The conditions about which function prologue is emitted by the compiler
    changed in go1.8, changed the test program so that callme2 will still
    have a prologue under go1.8.
    
    * service/test: fix step test
    
    compilation units are linked in a different order under go1.8 so the
    code of 'fmt' is no longer located after 'main' in the executable,
    changed the tests so that they don't rely on this assumption anymore.
    
    * proc: change runtime.Breakpoint support for go1.8
    
    Before 1.8 it was sufficient to step twice to exit a
    runtime.Breakpoint(), but go 1.8 added frame pointer tracking to small
    functions making runtime.Breakpoint longer.
    This changes runtime.Breakpoint handling in Continue to single step as
    many times as are needed to exit runtime.Breakpoint.
    
    * proc/test: fix TestIssue561 for go1.8
    8724b3fc