1. 23 2月, 2017 2 次提交
    • A
      proc/stack: use BP when FDE is not available · 92faa95b
      aarzilli 提交于
      On Windows we can sometimes encounter threads stopped in locations for
      which we do not have entries in debug_frame.
      These cases seem to be due to calls to Windows API in the go runtime,
      we can still produce a (partial) stack trace in this circumstance by
      following frame pointers (starting with BP).
      We still prefer debug_frame entries when available since go functions
      do not have frame pointers before go1.8.
      92faa95b
    • A
      proc/windows: handle delayed events · 1a68f8d3
      aarzilli 提交于
      Sometimes windows will send us events about breakpoints we have
      already removed from the code despite the fact that we go to great
      lengths to avoid this already.
      
      Change waitForDebugEvent to check that when we receive a breakpoint
      event the corresponding memory actually contains an INT 3
      instruction, if it doesn't ignore the event and restart the thread.
      1a68f8d3
  2. 22 2月, 2017 1 次提交
  3. 17 2月, 2017 2 次提交
  4. 14 2月, 2017 2 次提交
  5. 10 2月, 2017 2 次提交
  6. 09 2月, 2017 4 次提交
  7. 08 2月, 2017 5 次提交
    • A
      Improve stacktraces (#721) · e77595ce
      Alessandro Arzilli 提交于
      * service/rpccommon: fixed typo
      
      * proc: test parseG while target is in runtime.deferreturn
      
      runtime.deferreturn will change the value of curg._defer.fn in such a
      way that if the target is stopped at just the right instruction it
      may crash an incorrect implementation of parseG
      
      * proc/stack: handle stack barriers correctly
      
      Correctly handle stack barriers insterted during garbage collection.
      e77595ce
    • A
      proc: Make sure CurrentLoc of G returned by GetG is up to date (#723) · 8c96e275
      Alessandro Arzilli 提交于
      We are already doing this in GoroutinesInfo we should be doing it for
      GetG. The main consequence of not doing this is that the CurrentLoc of
      DebuggerState.SelectedGoroutine is out of date compared to the location
      of the thread running it.
      8c96e275
    • A
      Trace optimizations (#695) · 098457e5
      Alessandro Arzilli 提交于
      * proc: Added trace benchmark
      
      Results:
      
      BenchmarkTrace-4   	    5000	  36195899 ns/op
      
      * proc/linux: faster single step implementation.
      
      BenchmarkTrace-4   	    5000	   2093271 ns/op
      
      * proc: Cache function debug_info entries to speed up variable lookup.
      
      BenchmarkTrace-4   	    5000	   1864846 ns/op
      
      * proc/variables: Optimize FunctionArguments by prefetching frame
      
      BenchmarkTrace-4   	    5000	   1815795 ns/op
      
      * proc/variables: optimized parseG
      
      BenchmarkTrace-4   	   10000	    712767 ns/op
      098457e5
    • A
      Go 1.8 compatibility (part 2) (#667) · 8724b3fc
      Alessandro Arzilli 提交于
      * 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
    • A
  8. 21 1月, 2017 1 次提交
  9. 12 1月, 2017 3 次提交
  10. 10 1月, 2017 2 次提交
  11. 06 1月, 2017 2 次提交
  12. 23 12月, 2016 1 次提交
  13. 20 12月, 2016 1 次提交
  14. 17 12月, 2016 2 次提交
  15. 03 11月, 2016 1 次提交
  16. 02 11月, 2016 1 次提交
    • E
      Flag to set working directory (#650) · 4064d6ac
      Evgeny L 提交于
      * proc: Add `wd` to Launch
      
      This change adds the `wd` arg which specify working directory of the
      program.
      
      Fixes #295
      
      * service/debugger: Add `Wd` field to debugger.Config
      
      This change adds the `Wd` field which specify working directory of the
      program launched by debugger.
      
      Fixes #295
      
      * service: Add `Wd` to service.Config
      
      This change adds the `Wd` field which specify working directory of the
      program debugger will launch.
      
      Fixes #295
      
      * cmd/dlv: Add `Wd` flag
      
      This change adds `Wd` flag which specify working directory of the
      program which launched by debugger.
      
      Fixes #295
      
      * only set the Linux working directory if it is set,
      stub out param in darwin and windows
      
      * set working directory for Windows
      https://godoc.org/golang.org/x/sys/windows#CreateProcess
      https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
      
      * Windows workingDir must be an *uint16
      
      * attempt to chdir on darwin via @yuntan
      
      * proc/exec_darwin.c: fix working directory for darwin
      
      * Add tests to check if working directory works.
      * Fix darwin implementation of fork/exec, which paniced if
        child fork returned.
      
      * cmd, service: rename Wd to WorkingDir
      4064d6ac
  17. 27 10月, 2016 1 次提交
    • A
      proc: Names of concrete types of interfaces parsing their runtime._type · f62bf8d1
      aarzilli 提交于
      Generate names of the concrete types stored inside interface variables
      by fully parsing their runtime._type instead of simply using the str
      field.
      
      This allows delve to read the contents of an interface variable when
      the program imports multiple packages that have the same name. It also
      allows delve to correctly interpret some complex anonymous types.
      
      Fixes #455
      f62bf8d1
  18. 26 10月, 2016 1 次提交
  19. 23 10月, 2016 1 次提交
  20. 22 10月, 2016 3 次提交
  21. 05 10月, 2016 1 次提交
  22. 30 9月, 2016 1 次提交