1. 02 8月, 2017 2 次提交
  2. 27 7月, 2017 1 次提交
  3. 21 7月, 2017 1 次提交
  4. 19 7月, 2017 1 次提交
  5. 08 7月, 2017 1 次提交
  6. 31 5月, 2017 1 次提交
  7. 27 5月, 2017 1 次提交
  8. 17 5月, 2017 1 次提交
    • A
      proc: next, stepout should work on recursive goroutines (#831) · 35405583
      Alessandro Arzilli 提交于
      Before this commit our temp breakpoints only checked that we would stay
      on the same goroutine.
      However this isn't enough for recursive functions we must check that we
      stay on the same goroutine AND on the same stack frame (or, in the case
      of the StepOut breakpoint, the previous stack frame).
      
      This commit:
      1. adds a new synthetic variable runtime.frameoff that returns the
         offset of the current frame from the base of the call stack.
         This is similar to runtime.curg
      2. Changes the condition used for breakpoints on the lines of the
         current function to check that runtime.frameoff hasn't changed.
      3. Changes the condition used for breakpoints on the return address to
         check that runtime.frameoff corresponds to the previous frame in the
         stack.
      4. All other temporary breakpoints (the step-into breakpoints and defer
         breakpoints) remain unchanged.
      
      Fixes #828
      35405583
  9. 09 5月, 2017 1 次提交
  10. 05 5月, 2017 1 次提交
  11. 26 4月, 2017 1 次提交
  12. 19 4月, 2017 1 次提交
  13. 29 3月, 2017 1 次提交
    • A
      proc: add test for attach/detach, fix detach (#773) · 7b19fe9e
      Alessandro Arzilli 提交于
      Detach did not work for processes we attach to via PID.
      
      Linux: we were only detaching from the main thread, all threads are
      detached independently
      
      Windows: we must resume all threads before detaching.
      
      macOS: still broken.
      
      Updates #772
      7b19fe9e
  14. 10 2月, 2017 1 次提交
  15. 08 2月, 2017 3 次提交
    • 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
      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
  16. 21 1月, 2017 1 次提交
  17. 10 1月, 2017 1 次提交
    • A
      Fix for #614 and #683 (#687) · 1afcc6c1
      Alessandro Arzilli 提交于
      * service: Prevent panics from crashing delve and killing the target
      
      Catch all unrecovered proc and debugger panics in the service layer and
      report them as errors, allow users to cleanly detach from the target
      and quit.
      
      Fixes #614
      
      * proc: Next/Step should not panic if line info can not be found.
      
      Fixes #683
      1afcc6c1
  18. 20 12月, 2016 1 次提交
  19. 03 11月, 2016 1 次提交
  20. 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
  21. 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
  22. 22 10月, 2016 3 次提交
  23. 30 9月, 2016 1 次提交
  24. 27 9月, 2016 2 次提交
    • A
      proc: Implement Step using Continue · 7c49d496
      aarzilli 提交于
      Instead of repeatedly calling StepInstruction set breakpoints to the
      destination of CALL instructions (or on the CALL instructions
      themselves for indirect CALLs), then call Continue.
      Calls to unexported runtime functions are skipped.
      Reduces the number of code paths managing inferior state from 3 to 2
      (StepInstruction, Continue).
      
      Fixes #561
      7c49d496
    • A
      proc: bugfix: Next and normal calls to deferred function · 8d582620
      aarzilli 提交于
      When a deferred function is called directly Next and StepOut should not
      step into it.
      
      Fixes #582
      8d582620
  25. 25 9月, 2016 1 次提交
  26. 22 7月, 2016 1 次提交
    • D
      proc: Fix stepping into runtime.duff* (#575) · 218c2b95
      dr2chase 提交于
      Detect calls that do not target a function's entrypoint
      (i.e, calls to runtime.duffzero and runtime.duffcopy) and
      instead step into them directly.  StepInto sets a breakpoint
      past the called function's prologue and expects that continue
      will hit that breakpoint, but because the call is into the
      interior of the function (well past the prologue) this fails.
      
      Fixes #573
      218c2b95
  27. 30 6月, 2016 1 次提交
    • A
      proc: detect when Launching non-executable files · 51c39ed1
      aarzilli 提交于
      This provides a better error message when the user tries to run dlv
      debug on a directory that does not contain a main package, when `dlv
      exec` is used with a source file.
      
      Additionally the architecture of the executable is checked as suggested
      by @alexbrainman in #443.
      
      Fixes #509
      51c39ed1
  28. 30 5月, 2016 1 次提交
    • A
      Go 1.7 compatibility (#524) · 9bc6ad4f
      Alessandro Arzilli 提交于
      * tests: update to cope with go1.7 SSA compiler
      
      * de-vendored golang.org/x/debug/dwarf
      
      We need our own tweaked version
      
      * dwarf/debug/dwarf: always use the entry's name attribute
      
      Using the name attribute leads to better type names as well as fixes
      inconsistencies between 1.5, 1.6 and 1.7.
      
      * proc: Updated loadInterface to work with go1.7
      
      go1.7 changed the internal representation of types, removing the string
      field from runtime._type.
      Updated loadInterface to use the new str field.
      9bc6ad4f
  29. 18 5月, 2016 1 次提交
  30. 25 4月, 2016 3 次提交
    • A
      terminal,service: auto-continue during next and step (#448) · c4e01da5
      Alessandro Arzilli 提交于
      * proc: bugfix: StepInto can not function when temp bps exist
      
      * terminal,service: auto-continue during next and step
      
      Make dlv call continue automatically when a breakpoint is hit on a
      different goroutine during a next or step operation.
      Added API hooks to implement the other solution to this problem (cancel
      the next/step operation if a different breakpoint is hit).
      
      Fixes #387
      c4e01da5
    • A
      proc: allow use of quoted type names in type casts (#434) · a7a0cc75
      Alessandro Arzilli 提交于
      If we are unable to correctly guess how a type is serialized in
      debug_info let the user specify it directly.
      
      Workaround for #455
      a7a0cc75
    • A
      proc: Improvements to Variable printing (#444) · 473b6638
      Alessandro Arzilli 提交于
      * service/api: Removed unused fields of service/api.Function
      
      * proc/eval: Set return variable name to input expression
      
      * all: fine-grained control of loadValue for better variable printing
      
      Makes proc.(*Variable).loadValue loading parameters configurable
      through one extra argument of type LoadConfig.
      This interface is also exposed through the API so clients can control
      how much of a variable delve should read.
      473b6638
  31. 22 4月, 2016 1 次提交
    • M
      proc: Fix command-line arguments on Windows (#501) · 60946a75
      Matias Lahti 提交于
      * proc: add tests for command-line arguments
      
      adds tests to make sure command-line arguments are passed to Launch() properly
      
      * proc_windows: pass command-line arguments to CreateProcess()
      
      build command-line arguments according to how the standard library does it and pass the command line along to the actual syscall on Windows.
      
      see discussion in #479
      
      * proc: better testing of cmd-line arguments
      
      * proc_windows: fix a possible error-case with passing just 1 argument
      
      previously, the command line pointer passed to sys.CreateProcess was empty, if we had 0 parameters (len(cmd) == 1, as cmd[0] is the executable, so no cmdlineGo would be created, while with any argument it would as len(cmd) > 1). This might cause problems down the road, so make sure we include the command line every time, even if it seems to work without.
      
      * proc: improve testing of command-line arguments
      
      test that arguments with spaces are passed on correctly and DRY failure/success condition checking in the args test
      60946a75
  32. 09 3月, 2016 1 次提交