go x/build: Add gdb to Windows Builders

i5desfxk  于 6个月前  发布在  Go
关注(0)|答案(8)|浏览(49)

正如在 #22012 中观察到的那样,Windows构建器没有gdb,导致它们跳过任何与gdb相关的测试。
将gdb添加到这些包中

lb3vh1jj

lb3vh1jj1#

@johnsonj while you at it ...
2 out of 5 gdb tests are skipped on my computer:

c:\Users\Alex\dev\go\src>go test -v -run=TestGdb runtime
=== RUN   TestGdbPython
=== RUN   TestGdbPythonCgo
=== RUN   TestGdbBacktrace
=== RUN   TestGdbAutotmpTypes
=== RUN   TestGdbConst
--- SKIP: TestGdbPython (0.05s)
        runtime-gdb_test.go:55: gdb version 7.8
        runtime-gdb_test.go:70: skipping due to lack of python gdb support: Python scripting is not supported in this copy of GDB.
--- SKIP: TestGdbPythonCgo (0.04s)
        runtime-gdb_test.go:55: gdb version 7.8
        runtime-gdb_test.go:70: skipping due to lack of python gdb support: Python scripting is not supported in this copy of GDB.
--- PASS: TestGdbBacktrace (0.51s)
        runtime-gdb_test.go:55: gdb version 7.8
--- PASS: TestGdbAutotmpTypes (0.54s)
        runtime-gdb_test.go:55: gdb version 7.8
--- PASS: TestGdbConst (0.54s)
        runtime-gdb_test.go:55: gdb version 7.8
        runtime-gdb_test.go:436: output "No symbol \"startup\" in current context.\nBreakpoint 1 at 0x44d004: file C:/Users/Alex/AppData/Local/Temp/go-build263992595/main.go, line 9.\n[New Thread 6644.0x2228]\n[New Thread 6644.0x6a8]\n[New Thread 6644.0x2938]\n[New Thread 6644.0x135c]\nwarning: Can not parse XML library list; XML support was disabled at compile time\n[New Thread 6644.0x1dd4]\n[New Thread 6644.0x2258]\n[New Thread 6644.0x239c]\n[New Thread 6644.0x1a9c]\n\nBreakpoint 1, main.main () at C:/Users/Alex/AppData/Local/Temp/go-build263992595/main.go:9\n9\t\tprintln(\"hello world\")\n$1 = 42\n$2 = 18446744073709551615\n$3 = -1\n$4 = 1 '\\001'\n"
PASS
ok      runtime 0.649s

c:\Users\Alex\dev\go\src>

I suspect it would be hard to make skipped tests run. As far as I remember I tried some time ago and failed. Do not spent too much time on it if you cannot.
Alex

gdx19jrr

gdx19jrr2#

当选择要运行的gdb版本时,请注意gdb 7.9.1在我们测试中失败了-请参阅#24743以获取详细信息。

Alex

wnavrhmk

wnavrhmk3#

https://go.dev/cl/470596提到了这个问题:runtime: set procid on Windows

slwdgvem

slwdgvem4#

如果通过,CL 470596将取消所有Windows上的gdb测试。我已经尝试使用gdb 12.1,所有测试都通过了。现在是时候将gdb添加到Windows构建器了吗?
我对这个问题特别感兴趣,因为我想在#58378中添加一些CGO解包测试,理想情况下,它们也应该使用gdb和SEH(一旦#57302完成)在Windows上运行。

nfzehxib

nfzehxib5#

是否应该将gdb添加到Windows构建器中?
对我来说原则上是可以的。您用于测试的GDB 12发行版/版本是什么?

6psbrbz9

6psbrbz96#

给自己的提示:当我们安装GDB时,也可以考虑安装Delve(目前我认为没有任何测试在Windows上运行,但情况可能会改变)。

jc3wubiy

jc3wubiy7#

是否应该在Windows构建器中添加gdb?
对我来说原则上是可以的。你用于测试的GDB 12发行版/版本是什么?
你从运行choco install mingw --version=12.2.0得到的那个。它在底层安装了这个:https://github.com/brechtsanders/winlibs_mingw/releases/tag/12.2.0-14.0.6-10.0.0-ucrt-r2

$ gcc --version
gcc.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gdb --version
GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
zhte4eai

zhte4eai8#

https://go.dev/cl/473116提到了这个问题:runtime: skip TestGdbPanic on Windows

相关问题