1. 29 11月, 2017 1 次提交
    • A
      proc: support cgo stacktraces · 5372588c
      aarzilli 提交于
      When creating a stack trace we should switch between the goroutine
      stack and the system stack (where cgo code is executed) as appropriate
      to reconstruct the logical stacktrace.
      
      Goroutines that are currently executing on the system stack will have
      the SystemStack flag set, frames of the goroutine stack will have a
      negative FrameOffset (like always) and frames of the system stack will
      have a positive FrameOffset (which is actually just the CFA value for
      the frame).
      
      Updates #935
      5372588c
  2. 22 11月, 2017 2 次提交
  3. 21 11月, 2017 2 次提交
  4. 18 11月, 2017 1 次提交
    • A
      proc: refactor stack.go to use DWARF registers · f4e2000f
      aarzilli 提交于
      Instead of only tracking a few cherrypicked registers in stack.go track
      all DWARF registers.
      
      This is needed for cgo code and for the locationlists emitted by go in
      1.10:
      * The debug_frame sections emitted by C compilers can not be used
        without tracking all registers
      * the loclists emitted by go1.10 need all registers of a frame to be
        interpreted.
      f4e2000f
  5. 04 11月, 2017 1 次提交
  6. 31 8月, 2017 1 次提交
  7. 02 8月, 2017 4 次提交
  8. 19 7月, 2017 1 次提交
    • A
      proc/eval: optimize variable lookup (#925) · 222cf7fc
      Alessandro Arzilli 提交于
      Variable lookup is slow because it requires a full scan of debug_info
      to check for package variables, this doesn't matter much in interactive
      use but can slow down evaluation of breakpoint conditions
      significantly.
      
      Providing benchmark proof for this is hard since this effect doesn't
      show for small programs with small debug_info sections.
      222cf7fc
  9. 30 6月, 2017 2 次提交
    • A
      proc/variables: dereference concrete value of interface variables (#905) · 293c5087
      Alessandro Arzilli 提交于
      The concrete value of an interface is always stored as a pointer inside
      an interface variable. So far we have followed the memory layout and
      reported the type of the 'data' attribute of interfaces as a pointer,
      however this makes it impossible to distinguish interfaces with
      concrete value of type 'A' from interfaces of concrete value of type
      '*A'.
      
      With this changeset when we autodereference pointers when the concrete
      type of an interface is not a pointer.
      293c5087
    • F
      Fix various issues detected by megacheck (#880) · 32a005de
      Florin Pățan 提交于
      * Fix various issues detected by megacheck
      
      I've ran honnef.co/go/tools/cmd/megacheck and fixed a few of the
      things that came up there.
      
      * Cleanup using Gogland
      32a005de
  10. 31 5月, 2017 1 次提交
  11. 27 5月, 2017 1 次提交
  12. 26 5月, 2017 1 次提交
  13. 25 5月, 2017 1 次提交
    • A
      pkg/proc: remove unused types (#850) · 53908019
      Alessandro Arzilli 提交于
      type M struct was never used (as far as I know).
      type VariableEval interface was used for a brief period of time during
      the refactoring, now both its methods are functions.
      53908019
  14. 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
  15. 26 4月, 2017 1 次提交
  16. 22 4月, 2017 2 次提交
    • A
      proc: refactoring: merge target into proc · b6fe5aeb
      aarzilli 提交于
      - moved target.Interface into proc as proc.Process
      - rename proc.IThread to proc.Thread
      - replaced interfaces DisassembleInfo, Continuable and
        EvalScopeConvertible with Process.
      - removed superfluous Gdbserver prefix from types in the gdbserial
        backend.
      - removed superfluous Core prefix from types in the core backend.
      b6fe5aeb
    • A
      proc: refactoring: split backends to separate packages · 15bac719
      aarzilli 提交于
      - move native backend to pkg/proc/native
      - move gdbserver backend to pkg/proc/gdbserial
      - move core dumps backend to pkg/proc/core
      15bac719
  17. 19 4月, 2017 2 次提交
  18. 14 4月, 2017 1 次提交
  19. 07 4月, 2017 1 次提交
    • A
      proc refactor: split out BinaryInfo implementation (#745) · 436a3c21
      Alessandro Arzilli 提交于
      * proc: refactor BinaryInfo part of proc.Process to own type
      
      The data structures and associated code used by proc.Process
      to implement target.BinaryInfo will also be useful to support a
      backend for examining core dumps, split this part of proc.Process
      to a different type.
      
      * proc: compile support for all executable formats unconditionally
      
      So far we only compiled in support for loading the executable format
      supported by the host operating system.
      Once support for core files is introduced it is however useful to
      support loading in all executable formats, there is no reason why it
      shouldn't be possible to examine a linux coredump on windows, or
      viceversa.
      
      * proc: bugfix: do not resume threads on detach if killing
      
      * Replace BinaryInfo interface with BinInfo() method returning proc.BinaryInfo
      436a3c21
  20. 14 3月, 2017 1 次提交
    • D
      pkg/proc: tolerate absence of stack barriers in Go 1.9 (#762) · bd48358d
      dr2chase 提交于
      Stack barriers were removed in Go 1.9, and thus code that
      expected various stack-barrier-related symbols to exist
      does not find them.  Check for their absence and do not
      crash when they are missing.  Disable stack-barrier-handling
      test for 1.9 and beyond.
      
      Fixes #754.
      bd48358d
  21. 10 2月, 2017 1 次提交
  22. 09 2月, 2017 3 次提交
  23. 08 2月, 2017 2 次提交
    • 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
  24. 21 1月, 2017 1 次提交
  25. 17 12月, 2016 1 次提交
  26. 03 11月, 2016 1 次提交
  27. 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
  28. 25 9月, 2016 1 次提交
  29. 07 9月, 2016 1 次提交