1. 25 9月, 2021 1 次提交
  2. 16 7月, 2021 1 次提交
  3. 13 7月, 2021 1 次提交
    • S
      service/dap: add panic and throw text to stopped event (#2559) · f86ed675
      Suzy Mueller 提交于
      * service/dap: add panic and throw text to stopped event
      
      We can add more information to the stopped events on errors using
      the `Text` field in the stopped event. We already use this to display
      the runtime errors. Adding this information to the stopped reason will
      also help to show the user additional info when a stopped event is not
      associated with a particular goroutine.
      f86ed675
  4. 08 7月, 2021 1 次提交
    • A
      Go 1.17 support branch (#2451) · f0a32c8e
      Alessandro Arzilli 提交于
      * proc: support new Go 1.17 panic/defer mechanism
      
      Go 1.17 will create wrappers for deferred calls that take arguments.
      Change defer reading code so that wrappers are automatically unwrapped.
      
      Also the deferred function is called directly by runtime.gopanic, without going through runtime.callN which means that sometimes when a panic happens the stack is either:
      
      0. deferred function call
      1. deferred call wrapper
      2. runtime.gopanic
      
      or:
      
      0. deferred function call
      1. runtime.gopanic
      
      instead of always being:
      
      0. deferred function call
      1. runtime.callN
      2. runtime.gopanic
      
      the isPanicCall check is changed accordingly.
      
      * test: miscellaneous minor test fixes for Go 1.17
      
      * proc: resolve inlined calls when stepping out of runtime.breakpoint
      
      Calls to runtime.Breakpoint are inlined in Go 1.17 when inlining is
      enabled, resolve inlined calls in stepInstructionOut.
      
      * proc: add support for debugCallV2 with regabi
      
      This change adds support for the new debug call protocol which had to
      change for the new register ABI introduced in Go 1.17.
      
      Summary of changes:
      - Abstracts over the debug call version depending on the Go version
        found in the binary.
      - Uses R12 instead of RAX as the debug protocol register when the binary
        is from Go 1.17 or later.
      - Creates a variable directly from the DWARF entry for function
        arguments to support passing arguments however the ABI expects.
      - Computes a very conservative stack frame size for the call when
        injecting a call into a Go process whose version is >=1.17.
      Co-authored-by: NMichael Anthony Knyszek <mknyszek@google.com>
      Co-authored-by: NAlessandro Arzilli <alessandro.arzilli@gmail.com>
      
      * TeamCity: enable tests on go-tip
      
      * goversion: version compatibility bump
      
      * TeamCity: fix go-tip builds on macOS/arm64
      Co-authored-by: NMichael Anthony Knyszek <mknyszek@google.com>
      f0a32c8e
  5. 21 2月, 2021 1 次提交
  6. 06 1月, 2021 1 次提交
    • A
      Go 1.16 support branch (#2214) · 6dd686ca
      Alessandro Arzilli 提交于
      * proc: misc test fixes for Go 1.16
      
      * proc: fix cgo stacktraces in Go 1.16 with simplified C -> Go call path
      
      * dwarf/line: make dwarf/line correct when '\\' are used
      
      Our code depends heavily on paths being '/' separated because go always
      produced '/' separated file paths. The call to filepath.Join will
      normalize the paths, on windows, to always be '\\' separated, which
      violated our assumptions.
      
      This didn't use to be a problem because the codepath that calls
      filepath.Join was never exercised by executable files produced by Go,
      but Go 1.16 started producing debug_line sections that use the
      directory table with https://go-review.googlesource.com/c/go/+/263017/.
      
      Fix this to always use path.Join after making sure, on windows, to
      always normalize paths to use '/' as a separator. Replace the use of
      filepath.IsAbs with an operating system independent version.
      
      * goversion: bump supported Go version
      6dd686ca
  7. 17 8月, 2020 1 次提交
  8. 29 7月, 2020 1 次提交
    • A
      Go 1.15 support (#2011) · f9c8f7f5
      Alessandro Arzilli 提交于
      * proc: start variable visibility one line after their decl line
      
      In most cases variables shouldn't be visible on their declaration line
      because they won't be initialized there.
      Function arguments are treated as an exception.
      
      This fix is only applied to programs compiled with Go 1.15 or later as
      previous versions of Go did not report the correct declaration line for
      variables captured by closures.
      
      Fixes #1134
      
      * proc: silence go vet error
      
      * Makefile: enable PIE tests on windows/Go 1.15
      
      * core: support core files for PIEs on windows
      
      * goversion: add Go 1.15 to supported versions
      
      * proc: fix function call injection for Go 1.15
      
      Go 1.15 changed the call injection protocol so that the runtime will
      execute the injected call on a different (new) goroutine.
      
      This commit changes the function call support in delve to:
      
      1. correctly track down the call injection state after the runtime
         switches to a different goroutine.
      2. correctly perform the escapeCheck when stack values can come from
         multiple goroutine stacks.
      
      * proc: miscellaneous fixed for call injection under macOS with go 1.15
      
      - create copy of SP in debugCallAXCompleteCall case because the code
        used to assume that regs doesn't change
      - fix automatic address calculation for function arguments when an
        argument has a spurious DW_OP_piece at entry
      f9c8f7f5
  9. 20 3月, 2020 1 次提交
    • A
      travis-ci: autogenerate .travis.yml (#1939) · 4aee2815
      Alessandro Arzilli 提交于
      Autogenerates .travis.yml configuration using the contents of
      pkg/goversion/compat.go.
      Also:
      - excludes testing of windows/amd64/tip and linux/arm64/tip (Travis-CI
        can't get Go at tip for those combinations).
      - Removes Go 1.11 from pkg/goversion/compat.go which we don't test
        anymore.
      4aee2815
  10. 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
  11. 23 10月, 2019 1 次提交
  12. 16 9月, 2019 1 次提交
  13. 01 7月, 2019 1 次提交
    • A
      Go 1.13 support (#1546) · 55eed318
      Alessandro Arzilli 提交于
      * tests: fix tests for Go 1.13
      
      - Go 1.13 doesn't autogenerate init functions anymore, tests that
        expected that now fail and should be skipped.
      - Plugin tests now need -gcflags'all=-N -l' now, we were probably
        getting lucky with -gcflags='-N -l' before.
      
      * proc: allow signed integers as shift counts
      
      Go1.13 allows signed integers to be used as the right hand side of a
      shift operator, change eval to match.
      
      * goversion: update maximum supported version
      
      * travis: force Go to use vendor directory
      
      Travis scripts get confused by "go: downloading" lines, the exact
      reason is not clear. Testing that the vendor directory is up to date is
      a good idea anyway.
      55eed318
  14. 27 4月, 2019 1 次提交
    • A
      cmd/dlv: add Go version check (#1533) · 79e0f543
      Alessandro Arzilli 提交于
      Before doing anything check that the version of Go is compatible with
      the current version of Delve.
      This will improve the error message in the case that  another change as
      disruptive as Go1.11 dwarf compression, happens.
      79e0f543