mirror of
https://github.com/golang/go
synced 2024-11-22 22:40:02 -07:00
runtime: make gdb test resilient to line numbering
Don't break on line number, instead break on the actual call. This makes the test more robust to line numbering changes in the backend. A CL (28950) changed the generated code line numbering slightly. A MOVW $0, R0 instruction at the start of the function changed to line 10 (because several constant zero instructions got CSEd, and one gets picked arbitrarily). That's too fragile for a test. Change-Id: I5d6a8ef0603de7d727585004142780a527e70496 Reviewed-on: https://go-review.googlesource.com/29085 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
6ca7c2055b
commit
d00a3cead8
@ -105,17 +105,20 @@ func TestGdbPython(t *testing.T) {
|
||||
"-ex", "set startup-with-shell off",
|
||||
"-ex", "info auto-load python-scripts",
|
||||
"-ex", "set python print-stack full",
|
||||
"-ex", "br main.go:10",
|
||||
"-ex", "br fmt.Println",
|
||||
"-ex", "run",
|
||||
"-ex", "echo BEGIN info goroutines\n",
|
||||
"-ex", "info goroutines",
|
||||
"-ex", "echo END\n",
|
||||
"-ex", "up", // up from fmt.Println to main
|
||||
"-ex", "echo BEGIN print mapvar\n",
|
||||
"-ex", "print mapvar",
|
||||
"-ex", "echo END\n",
|
||||
"-ex", "echo BEGIN print strvar\n",
|
||||
"-ex", "print strvar",
|
||||
"-ex", "echo END\n"}
|
||||
"-ex", "echo END\n",
|
||||
"-ex", "down", // back to fmt.Println (goroutine 2 below only works at bottom of stack. TODO: fix that)
|
||||
}
|
||||
|
||||
// without framepointer, gdb cannot backtrace our non-standard
|
||||
// stack frames on RISC architectures.
|
||||
|
Loading…
Reference in New Issue
Block a user