1. 11 4月, 2020 1 次提交
    • D
      *: Add --tty flag for debug / exec · 3e60ae20
      Derek Parker 提交于
      This flag allows users on UNIX systems to set the tty for the program
      being debugged by Delve. This is useful for debugging command line
      applications which need access to their own TTY, and also for
      controlling the output of the debugged programs so that IDEs may open a
      dedicated terminal to show the output for the process.
      3e60ae20
  2. 04 4月, 2020 1 次提交
  3. 03 4月, 2020 1 次提交
  4. 02 4月, 2020 2 次提交
  5. 01 4月, 2020 2 次提交
  6. 31 3月, 2020 1 次提交
  7. 26 3月, 2020 1 次提交
  8. 25 3月, 2020 1 次提交
    • A
      proc/gdbserial,debugger: allow clients to stop a recording (#1890) · 8bb93e9a
      Alessandro Arzilli 提交于
      Allows Delve clients to stop a recording midway by sending a
      Command('halt')
      request.
      
      This is implemented by changing debugger.New to start recording the
      process on a separate goroutine while holding the processMutex locked.
      By locking the processMutex we ensure that almost all RPC requests will
      block until the recording is done, since we can not respond correctly
      to any of them.
      API calls that do not require manipulating or examining the target
      process, such as "IsMulticlient", "SetApiVersion" and
      "GetState(nowait=true)" will work while we are recording the process.
      
      Two other internal changes are made to the API: both GetState and
      Restart become asynchronous requests, like Command. Restart because
      this way it can be interrupted by a StopRecording request if the
      rerecord option is passed.
      GetState because clients need a call that will block until the
      recording is compelted and can also be interrupted with a
      StopRecording.
      
      Clients that are uninterested in allowing the user to stop a recording
      can ignore this change, since eventually they will make a request to
      Delve that will block until the recording is completed.
      
      Clients that wish to support this feature must:
      
      1. call GetState(nowait=false) after connecting to Delve, before any
         call that would need to manipulate the target process
      2. allow the user to send a StopRecording request during the initial
         GetState call
      3. allow the user to send a StopRecording request during any subsequent
         Restart(rerecord=true) request (if supported).
      
      Implements #1747
      8bb93e9a
  9. 19 3月, 2020 3 次提交
  10. 12 3月, 2020 1 次提交
    • A
      proc,terminal: Implement reverse step, next and stepout (#1785) · 1a9e38aa
      Alessandro Arzilli 提交于
      * proc: move defer breakpoint code into a function
      
      Moves the code that sets a breakpoint on the first deferred function,
      used by both next and StepOut, to its function.
      
      * proc: implement reverse step/next/stepout
      
      When the direction of execution is reversed (on a recording) Step, Next and
      StepOut will behave similarly to their forward version. However there are
      some subtle interactions between their behavior, prologue skipping, deferred
      calls and normal calls. Specifically:
      
      - when stepping backwards we need to set a breakpoint on the first
        instruction after each CALL instruction, once this breakpoint is reached we
        need to execute a single StepInstruction operation to reverse step into the
        CALL.
      - to insure that the prologue is skipped reverse next needs to check if it
        is on the first instruction after the prologue, and if it is behave like
        reverse stepout.
      - there is no reason to set breakpoints on deferred calls when reverse
        nexting or reverse stepping out, they will never be hit.
      - reverse step out should generally place its breakpoint on the CALL
        instruction that created the current stack frame (which will be the CALL
        instruction immediately preceding the instruction at the return address).
      - reverse step out needs to treat panic calls and deferreturn calls
        specially.
      
      * service,terminal: implement reverse step, next, stepout
      1a9e38aa
  11. 11 3月, 2020 2 次提交
    • P
      service/dap: Add support for threads request (#1914) · 5613cf15
      polinasok 提交于
      * Add support for threads request
      
      * Address review comments
      
      * Relax threads test condition
      
      * Address review comments
      
      * Clean up unnecessary newline
      
      * Respond to review comment
      Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
      5613cf15
    • C
      pkg/proc,service: support linux/386 (#1884) · f3a191cd
      chainhelen 提交于
      Implement debugging function for 386 on linux with reference to AMD64.
      There are a few remaining problems that need to be solved in another time.
      
      1. The stacktrace of cgo are not exactly as expected.
      2. Not implement `core` for now.
      3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or
         similar function in $GOROOT/src/runtime/asm_386.s.
      
      Update #20
      f3a191cd
  12. 10 3月, 2020 1 次提交
  13. 05 3月, 2020 1 次提交
  14. 01 3月, 2020 1 次提交
  15. 27 2月, 2020 2 次提交
    • C
      pkg,service: Optimized the display of `examinemem` command. (#1888) · b09aed17
      chainhelen 提交于
      1. Don't use intelligent '#' in fmt of go because it is not always satisfying
      for diffrent version of golang. Always keep one leading zero for octal and
      one leading '0x' for hex manually. Then keep alignment for every byte.
      
      2. Always keep addr alignment when the lens of two adjacent address are
      different.
      
      Update #1814.
      b09aed17
    • E
      service/dap: clean shutdown sequence in server (#1889) · a8355486
      Eli Bendersky 提交于
      Using a stop channel to signal clean shutdown to the server's
      goroutines. Also updates the tests to trigger disconnectChan.
      
      This helps avoid spurious error logs when the client disconnects, when
      Ctrl+C is pressed, etc.
      a8355486
  16. 26 2月, 2020 3 次提交
  17. 25 2月, 2020 2 次提交
    • A
      proc,service: allow printing registers for arbitrary frames (#1875) · d925f6b7
      Alessandro Arzilli 提交于
      Adds an optional scope prefix to the `regs` command which allows
      printing registers for any stack frame (as long as they were somehow
      saved). Issue #1838 is not yet to be closed since we are still not
      recovering the registers of a segfaulting frame.
      
      Updates #1838
      d925f6b7
    • E
      service/dap: avoid hardcoded []byte slices in DAP tests (#1881) · 7f14f6ab
      Eli Bendersky 提交于
      * Remove hardcoded tests
      
      * Cleanup - consistent naming, simplify some code, remove unused func
      
      * Address review comments
      
      * Add Seq checks back
      
      * Address more review comments
      
      * Remove hardcoded tests
      
      * Cleanup - consistent naming, simplify some code, remove unused func
      
      * Address review comments
      
      * Add Seq checks back
      
      * Address more review comments
      
      * Make more consistent
      
      * More consistency
      
      * Simplify Except* methods with a helper
      
      Mark t.Helper() where appropriate
      7f14f6ab
  18. 22 2月, 2020 1 次提交
  19. 20 2月, 2020 2 次提交
  20. 16 2月, 2020 1 次提交
    • P
      service/dap: Initial implementation for 'dlv dap' (#1858) · fbc4623c
      polinasok 提交于
      * Initial implementation for 'dlv dap'
      
      * Fix Travis and AppVeyor failures
      
      * Address review comments
      
      * Address review comments
      
      * Regenrate documentation
      
      * Replace dap server printfs with log.Error
      
      * Update 'dap log'
      
      * Fix typos
      
      * Revert logflags changes that got mixed in by accident
      fbc4623c
  21. 14 2月, 2020 1 次提交
    • C
      pkg,service: add cmd `examinemem`(`x`) for examining memory. (#1814) · a5d9dbee
      chainhelen 提交于
      According to #1800 #1584 #1038, `dlv` should enable the user to dive into
      memory. User can print binary data in specific memory address range.
      But not support for sepecific variable name or structures temporarily.(Because
      I have no idea that modify `print` command.)
      
      Close #1584.
      a5d9dbee
  22. 13 2月, 2020 1 次提交
    • A
      proc: only format registers value when it's necessary (#1860) · b9d0ddd8
      Alessandro Arzilli 提交于
      A significant amount of time is spent generating the string
      representation for the proc.Registers object of each thread, since this
      field is rarely used (only when the Registers API is called) it should
      be generated on demand.
      
      Also by changing the internal representation of proc.Register to be
      closer to that of op.DwarfRegister it will help us implement #1838
      (when Delve will need to be able to display the registers of an
      internal frame, which we currently represent using op.DwarfRegister
      objects).
      
      Benchmark before:
      
      BenchmarkConditionalBreakpoints-4   	       1	22292554301 ns/op
      
      Benchmark after:
      
      BenchmarkConditionalBreakpoints-4   	       1	17326345671 ns/op
      
      Reduces conditional breakpoint latency from 2.2ms to 1.7ms.
      
      Updates #1549, #1838
      b9d0ddd8
  23. 12 2月, 2020 1 次提交
  24. 11 2月, 2020 1 次提交
    • A
      *: Go 1.14 support branch (#1727) · 0741d3e5
      Alessandro Arzilli 提交于
      * tests: misc test fixes for go1.14
      
      - math.go is now ambiguous due to changes to the go runtime so specify
        that we mean our own math.go in _fixtures
      - go list -m requires vendor-mode to be disabled so pass '-mod=' to it
        in case user has GOFLAGS=-mod=vendor
      - update version of go/packages, required to work with go 1.14 (and
        executed go mod vendor)
      - Increased goroutine migration in one development version of Go 1.14
        revealed a problem with TestCheckpoints in command_test.go and
        rr_test.go. The tests were always wrong because Restart(checkpoint)
        doesn't change the current thread but we can't assume that when the
        checkpoint was taken the current goroutine was running on the same
        thread.
      
      * goversion: update maximum supported version
      
      * Makefile: disable testing lldb-server backend on linux with Go 1.14
      
      There seems to be some incompatibility with lldb-server version 6.0.0
      on linux and Go 1.14.
      
      * proc/gdbserial: better handling of signals
      
      - if multiple signals are received simultaneously propagate all of them to the
        target threads instead of only one.
      - debugserver will drop an interrupt request if a target thread simultaneously
        receives a signal, handle this situation.
      
      * dwarf/line: normalize backslashes for windows executables
      
      Starting with Go 1.14 the compiler sometimes emits backslashes as well
      as forward slashes in debug_line, normalize everything to / for
      conformity with the behavior of previous versions.
      
      * proc/native: partial support for Windows async preempt mechanism
      
      See https://github.com/golang/go/issues/36494 for a description of why
      full support for 1.14 under windows is problematic.
      
      * proc/native: disable Go 1.14 async preemption on Windows
      
      See https://github.com/golang/go/issues/36494
      0741d3e5
  25. 22 1月, 2020 4 次提交
  26. 14 1月, 2020 1 次提交
  27. 10 1月, 2020 1 次提交
    • A
      proc,service: return build informations for each package · a8606afb
      aarzilli 提交于
      Adds an API call that returns a list of packages contained in the
      program and the files that were used to build them, and also a best
      guess at which filesystem directory contained the package when it was
      built.
      
      This can be used by IDEs to map file paths if the debugging environment
      doesn't match the build environment exactly.
      a8606afb