mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 12:05:21 +08:00
*: Go 1.14 support branch (#1727)
* 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
This commit is contained in:
committed by
GitHub
parent
bc9d95d615
commit
0741d3e57f
@ -197,7 +197,7 @@ func TestCheckpoints(t *testing.T) {
|
||||
bp := setFunctionBreakpoint(p, t, "main.main")
|
||||
assertNoError(proc.Continue(p), t, "Continue")
|
||||
when0, loc0 := getPosition(p, t)
|
||||
t.Logf("when0: %q (%#x)", when0, loc0.PC)
|
||||
t.Logf("when0: %q (%#x) %x", when0, loc0.PC, p.CurrentThread().ThreadID())
|
||||
|
||||
// Create a checkpoint and check that the list of checkpoints reflects this
|
||||
cpid, err := p.Checkpoint("checkpoint1")
|
||||
@ -215,7 +215,7 @@ func TestCheckpoints(t *testing.T) {
|
||||
assertNoError(proc.Next(p), t, "First Next")
|
||||
assertNoError(proc.Next(p), t, "Second Next")
|
||||
when1, loc1 := getPosition(p, t)
|
||||
t.Logf("when1: %q (%#x)", when1, loc1.PC)
|
||||
t.Logf("when1: %q (%#x) %x", when1, loc1.PC, p.CurrentThread().ThreadID())
|
||||
if loc0.PC == loc1.PC {
|
||||
t.Fatalf("next did not move process %#x", loc0.PC)
|
||||
}
|
||||
@ -226,8 +226,10 @@ func TestCheckpoints(t *testing.T) {
|
||||
// Move back to checkpoint, check that the output of 'when' is the same as
|
||||
// what it was when we set the breakpoint
|
||||
p.Restart(fmt.Sprintf("c%d", cpid))
|
||||
g, _ := proc.FindGoroutine(p, 1)
|
||||
p.SwitchGoroutine(g)
|
||||
when2, loc2 := getPosition(p, t)
|
||||
t.Logf("when2: %q (%#x)", when2, loc2.PC)
|
||||
t.Logf("when2: %q (%#x) %x", when2, loc2.PC, p.CurrentThread().ThreadID())
|
||||
if loc2.PC != loc0.PC {
|
||||
t.Fatalf("PC address mismatch %#x != %#x", loc0.PC, loc2.PC)
|
||||
}
|
||||
@ -252,6 +254,8 @@ func TestCheckpoints(t *testing.T) {
|
||||
_, err = p.ClearBreakpoint(bp.Addr)
|
||||
assertNoError(err, t, "ClearBreakpoint")
|
||||
p.Restart(fmt.Sprintf("c%d", cpid))
|
||||
g, _ = proc.FindGoroutine(p, 1)
|
||||
p.SwitchGoroutine(g)
|
||||
assertNoError(proc.Next(p), t, "First Next")
|
||||
assertNoError(proc.Next(p), t, "Second Next")
|
||||
when4, loc4 := getPosition(p, t)
|
||||
|
||||
Reference in New Issue
Block a user