]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: grow stack before test() to avoid gdb misbehavior
authorDavid Chase <drchase@google.com>
Tue, 22 May 2018 18:45:27 +0000 (14:45 -0400)
committerDavid Chase <drchase@google.com>
Wed, 23 May 2018 18:05:07 +0000 (18:05 +0000)
commit77c51c6c627e1f4f99305d0ffdf88daa18f43391
tree76ada712f263494dbe9c4ef5dbd5c6c64730cf2c
parent11b3ee6fec40857af609674292362fb9a096dff6
cmd/compile: grow stack before test() to avoid gdb misbehavior

While next-ing over a call in gdb, if execution of that call
causes a goroutine's stack to grow (i.e., be moved), gdb loses
track and runs ahead to the next breakpoint, or to the end of
the program, whichever comes first.

Prevent this by preemptively growing the stack so that
ssa/debug_test.go will reliably measure what is intended,
the goodness of line number placement and variable printing.

Fixes #25497.

Change-Id: I8daf931650292a8c8faad2285d7fd405f2157bd2
Reviewed-on: https://go-review.googlesource.com/114080
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
15 files changed:
src/cmd/compile/internal/ssa/testdata/hist.dlv-dbg.nexts
src/cmd/compile/internal/ssa/testdata/hist.dlv-opt.nexts
src/cmd/compile/internal/ssa/testdata/hist.gdb-dbg.nexts
src/cmd/compile/internal/ssa/testdata/hist.gdb-opt.nexts
src/cmd/compile/internal/ssa/testdata/hist.go
src/cmd/compile/internal/ssa/testdata/i22558.dlv-dbg.nexts
src/cmd/compile/internal/ssa/testdata/i22558.go
src/cmd/compile/internal/ssa/testdata/i22600.dlv-dbg-race.nexts
src/cmd/compile/internal/ssa/testdata/i22600.gdb-dbg-race.nexts
src/cmd/compile/internal/ssa/testdata/i22600.go
src/cmd/compile/internal/ssa/testdata/scopes.dlv-dbg.nexts
src/cmd/compile/internal/ssa/testdata/scopes.dlv-opt.nexts
src/cmd/compile/internal/ssa/testdata/scopes.gdb-dbg.nexts
src/cmd/compile/internal/ssa/testdata/scopes.gdb-opt.nexts
src/cmd/compile/internal/ssa/testdata/scopes.go