Repository: go
Issue: runtime: TestGdbPythonCgo fails on arm w/1.18
Labels: NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.18 linux/arm

</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><be>
<pre>

$ ./go env
GO111MODULE=""
GOARCH="arm"
GOBIN=""
GOCACHE="/home/chronos/user/.cache/go-build"
GOENV="/home/chronos/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/chronos/user/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/chronos/user/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/tmp/crew/go.20220316024607.dir/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/tmp/crew/go.20220316024607.dir/go/pkg/tool/linux_arm"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOARM="7"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/usr/local/tmp/go-build137372635=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->
```
go tool dist test
```


### What did you expect to see?
Not a failure!


### What did you see instead?
```
--- FAIL: TestGdbPythonCgo (42.37s)
    runtime-gdb_test.go:76: gdb version 11.2
    runtime-gdb_test.go:265: gdb output:
        Loading Go Runtime support.
        Breakpoint 1 at 0x923c8: file /usr/local/tmp/TestGdbPythonCgo3489257781/001/main.go, line 27.
        warning: Error disabling address space randomization: Success
        
        Program received signal SIGILL, Illegal instruction.
        0xf7d390c8 in _dl_debug_state () from /lib/ld-linux-armhf.so.3
        BEGIN info goroutines
        END
        BEGIN print mapvar
        No symbol "mapvar" in current context.
        END
        BEGIN print slicemap
        No symbol "slicemap" in current context.
        END
        BEGIN print strvar
        No symbol "strvar" in current context.
        END
        BEGIN print chanint
        No symbol "chanint" in current context.
        END
        BEGIN print chanstr
        No symbol "chanstr" in current context.
        END
        BEGIN info locals
        No symbol table info available.
        END
        BEGIN goroutine 1 bt
        No such goroutine:  1
        END
        BEGIN goroutine all bt
        END
        No break
point at main.go:15.
        Breakpoint 2 at 0x924ec: file /usr/local/tmp/TestGdbPythonCgo3489257781/001/main.go, line 30.
        
        Program terminated with signal SIGILL, Illegal instruction.
        The program no longer exists.
        BEGIN goroutine 1 bt at the end
        No such goroutine:  1
        END
    runtime-gdb_test.go:297: info goroutines failed: END
        BEGIN print mapvar
        No symbol "mapvar" in current context.
FAIL
FAIL	runtime	375.303s
```
Build log:
[go-1.18-armv7l.log](https://github.com/golang/go/files/8258707/go-1.18-armv7l.log)