]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: leave Pos unset for racewalk enter/exit
authorDavid Chase <drchase@google.com>
Thu, 16 Nov 2017 02:25:01 +0000 (18:25 -0800)
committerDavid Chase <drchase@google.com>
Fri, 17 Nov 2017 16:56:42 +0000 (16:56 +0000)
commitd2414cefbae4758ca48dd664b3a55e08eaaff755
treeb7a5fd86ba1efba031e4a5b622f4399a1d705a4f
parentc2efb2fde59d489f34bd7dafcae467b9f5f5eedd
cmd/compile: leave Pos unset for racewalk enter/exit

The locations chosen for racewalking inserted code can
be wrong and thus cause unwanted next/step behavior in
debuggers.  Forcing the positions to be unset results in
better behavior.

Test added, and test harness corrected to deal with
changes to gdb's output caused by -racewalk.

Incidental changes in Delve (not part of the usual testing,
but provided because we care about Delve) also reflected
in this CL.

Fixes #22600.

Change-Id: Idd0218afed52ab8c68efd9eabbdff3c92ea2b996
Reviewed-on: https://go-review.googlesource.com/78336
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/racewalk.go
src/cmd/compile/internal/ssa/debug_test.go
src/cmd/compile/internal/ssa/testdata/hist.opt-dlv.nexts
src/cmd/compile/internal/ssa/testdata/i22600.dbg-race-gdb.nexts [new file with mode: 0644]
src/cmd/compile/internal/ssa/testdata/i22600.go [new file with mode: 0644]