aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime-gdb_test.go
AgeCommit message (Collapse)Author
2015-11-12runtime: added mips64{,le} build tags and GOARCH casesYao Zhang
Change-Id: I381c03d957a0dccae5f655f02e92760e5c0e9629 Reviewed-on: https://go-review.googlesource.com/14929 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
2015-11-03[dev.ssa] cmd/compile: start arguments as spilledKeith Randall
Declare a function's arguments as having already been spilled so their use just requires a restore. Allow spill locations to be portions of larger objects the stack. Required to load portions of compound input arguments. Rename the memory input to InputMem. Use Arg for the pre-spilled argument values. Change-Id: I8fe2a03ffbba1022d98bfae2052b376b96d32dda Reviewed-on: https://go-review.googlesource.com/16536 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
2015-07-24runtime: require gdb version 7.9 for gdb testIan Lance Taylor
Issue 11214 reports problems with older versions of gdb. It does work with gdb 7.9 on my Ubuntu Trusty system, so take that as the minimum required version. Fixes #11214. Change-Id: I61b732895506575be7af595f81fc1bcf696f58c2 Reviewed-on: https://go-review.googlesource.com/12626 Reviewed-by: Austin Clements <austin@google.com>
2015-07-10runtime, cmd/go: fix tests to work when GOROOT_FINAL is setIan Lance Taylor
When GOROOT_FINAL is set when running all.bash, the tests are run before the files are copied to GOROOT_FINAL. The tests are run with GOROOT set, so most work fine. This fixes two cases that do not. In cmd/go/go_test.go we were explicitly removing GOROOT from the environment, causing tests that did not themselves explicitly set GOROOT to fail. There was no need to explicitly remove GOROOT, so don't do it. If people choose to run "go test cmd/go" with a bad GOROOT, that is their own lookout. In the runtime GDB test, the linker has told gdb to find the support script in GOROOT_FINAL, which will fail. Check for that case, and skip the test when we see it. Fixes #11652. Change-Id: I4d3a32311e3973c30fd8a79551aaeab6789d0451 Reviewed-on: https://go-review.googlesource.com/12021 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-05-28runtime: use stripped test environment for TestGdbPythonAustin Clements
Most runtime tests that invoke the compiler to build a sub-test binary do so with a special environment constructed by testEnv that strips out environment variables that should apply to the test but not to the build. Fix TestGdbPython to use this test environment when invoking go build, like other tests do. Change-Id: Iafdf89d4765c587cbebc427a5d61cb8a7e71b326 Reviewed-on: https://go-review.googlesource.com/10455 Reviewed-by: Russ Cox <rsc@golang.org>
2015-05-08cmd/internal/ld: generate correct .debug_frames on RISC architecturesShenghou Ma
With this patch, gdb seems to be able to corretly backtrace Go process on at least linux/{arm,arm64,ppc64}. Change-Id: Ic40a2a70e71a19c4a92e4655710f38a807b67e9a Reviewed-on: https://go-review.googlesource.com/9822 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-04-29runtime: skip gdb goroutine backtrace test on non-x86Shenghou Ma
Gdb is not able to backtrace our non-standard stack frames on RISC architectures without frame pointer. Change-Id: Id62a566ce2d743602ded2da22ff77b9ae34bc5ae Signed-off-by: Shenghou Ma <minux@golang.org> Reviewed-on: https://go-review.googlesource.com/9456 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-10runtime: Fix GDB integration with Python 2Derek Buitenhuis
A similar fix was applied in 545686857bc4c2e7a5306d97e5ef48f631d277bc but another instance of 'pc' was missed. Also adds a test for the goroutine gdb command. It currently uses goroutine 2 for the test, since goroutine 1 has its stack pointer set to 0 for some reason. Change-Id: I53ca22be6952f03a862edbdebd9b5c292e0853ae Reviewed-on: https://go-review.googlesource.com/8729 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-03-30runtime: allow pointers to strings to be printedLee Packham
Being able to printer pointers to strings means one will able to output the result of things like the flag library and other components that use string pointers. While here, adjusted the tests for gdb to test original string pretty printing as well as pointers to them. It was doing it via the map before but for completeness this ensures it's tested as a unit. Change-Id: I4926547ae4fa6c85ef74301e7d96d49ba4a7b0c6 Reviewed-on: https://go-review.googlesource.com/8217 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-03-01runtime: TestGdbPython 'print mapvar' should not need unwindingJan Kratochvil
issue #10017: TestGdbPython 'print mapvar' is reported to fail on ppc64. issue #10002: TestGdbPython 'print mapvar' is reported to fail on arm hardfloat. The testcase now uses plain line number in main. Unwinding issues are unrelated to the GDB map prettyprinter feature. Remove arch-specific t.Skip()s from those two issues. Fixes #10017 Fixes #10002 Change-Id: I9d50ffe2f3eb7bf65dd17c8c76a2677571de68ba Reviewed-on: https://go-review.googlesource.com/6267 Reviewed-by: Minux Ma <minux@golang.org>
2015-02-26runtime: disable TestGdbPython on ppc64Russ Cox
(issue #10017) Change-Id: Ia1267dfdb4474247926a998e32d9c6520015757d Reviewed-on: https://go-review.googlesource.com/6130 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Austin Clements <austin@google.com>
2015-02-25runtime: skip failing gdb test on linux/armDave Cheney
Updates #10002 The gdb test added in 1c82e236f5ee is failing on most arm systems. Temporarily disable this test so that we can return to a working arm build. Change-Id: Iff96ea8d5a99e1ceacf4979e864ff196e5503535 Reviewed-on: https://go-review.googlesource.com/5902 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-02-25gdb: fix map prettyprinterJan Kratochvil
(gdb) p x Python Exception <class 'gdb.error'> There is no member named b.: $2 = map[string]string -> (gdb) p x $1 = map[string]string = {["shane"] = "hansen"} Change-Id: I874d02a029f2ac9afc5ab666afb65760ec2c3177 Reviewed-on: https://go-review.googlesource.com/5522 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-02-19runtime: don't test gdb on darwinJosh Bleecher Snyder
Fixes #9927 Change-Id: I2114cc21f7a4772e3d42bcad9642a8a545cd8e16 Reviewed-on: https://go-review.googlesource.com/5285 Reviewed-by: Minux Ma <minux@golang.org>
2015-02-17runtime: fix runtime-gdb_test on armAustin Clements
Apparently when ARM stops at a GDB breakpoint, it appears to be in syscall.Syscall. The "info goroutines" test expected it to be in a runtime function. Since this isn't fundamental to the test, simply tweak the test's regexp to make sure "info goroutines" prints some running goroutine with an active M, but don't require it to be in any particular function. Change-Id: Iba2618b46d3dc49cef62ffb72484b83ea7b0317d Reviewed-on: https://go-review.googlesource.com/5060 Reviewed-by: Dave Cheney <dave@cheney.net>
2015-02-17runtime: fix GDB "info goroutines" for Go 1.5Austin Clements
"info goroutines" is failing because it hasn't kept up with changes in the 1.5 runtime. This fixes three issues preventing "info goroutines" from working. allg is no longer a linked list, so switch to using the allgs slice. The g struct's 'status' field is now called 'atomicstatus', so rename uses of 'status'. Finally, this was trying to parse str(pc) as an int, but str(pc) can return symbolic information after the raw hex value; fix this by stripping everything after the first space. This also adds a test for "info goroutines" to runtime-gdb_test, which was previously quite skeletal. Change-Id: I8ad83ee8640891cdd88ecd28dad31ed9b5833b7a Reviewed-on: https://go-review.googlesource.com/4935 Reviewed-by: Minux Ma <minux@golang.org>
2015-02-06runtime: skip the gdb test if -iex is not supportedShenghou Ma
It turns out -iex argument is not supported by all gdb versions, but as we need to add the auto-load safe path before loading the inferior, test -iex support first and skip the test if it's not available. We should still update our builders though. Change-Id: I355697de51baf12162ba6cb82f389dad93f93dc5 Reviewed-on: https://go-review.googlesource.com/4070 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-02-06cmd/ld: restore .debug_gdb_script section after runtime reorganizationShenghou Ma
On some systems, gdb refuses to load Python plugin from arbitrary paths, so we have to add $GOROOT/src/runtime to auto-load-safe-path in the gdb script test. Change-Id: Icc44baab8d04a65bd21ceac2ab8ddb13c8d083e8 Reviewed-on: https://go-review.googlesource.com/2905 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-01-15runtime: fix runtime-gdb script loadingPaul Nasrat
runtime.rtype was a copy of reflect.rtype - update script to use that directly. Introduces a basic test which will skip on systems without appropriate GDB. Fixes #9326 Change-Id: I6ec74e947bd2e1295492ca34b3a8c1b49315a8cb Reviewed-on: https://go-review.googlesource.com/2821 Reviewed-by: Ian Lance Taylor <iant@golang.org>