func checkGdbEnvironment(t *testing.T) { … } func checkGdbVersion(t *testing.T) { … } func checkGdbPython(t *testing.T) { … } // checkCleanBacktrace checks that the given backtrace is well formed and does // not contain any error messages from GDB. func checkCleanBacktrace(t *testing.T, backtrace string) { … } // checkPtraceScope checks the value of the kernel parameter ptrace_scope, // skips the test when gdb cannot attach to the target process via ptrace. // See issue 69932 // // 0 - Default attach security permissions. // 1 - Restricted attach. Only child processes plus normal permissions. // 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE. // 3 - No attach. No process may call ptrace at all. Irrevocable. func checkPtraceScope(t *testing.T) { … } var helloSource … func lastLine(src []byte) int { … } func gdbArgsFixup(args []string) { … } func TestGdbPython(t *testing.T) { … } func TestGdbPythonCgo(t *testing.T) { … } func testGdbPython(t *testing.T, cgo bool) { … } const backtraceSource … // TestGdbBacktrace tests that gdb can unwind the stack correctly // using only the DWARF debug info. func TestGdbBacktrace(t *testing.T) { … } const autotmpTypeSource … // TestGdbAutotmpTypes ensures that types of autotmp variables appear in .debug_info // See bug #17830. func TestGdbAutotmpTypes(t *testing.T) { … } const constsSource … func TestGdbConst(t *testing.T) { … } const panicSource … // TestGdbPanic tests that gdb can unwind the stack correctly // from SIGABRTs from Go panics. func TestGdbPanic(t *testing.T) { … } const InfCallstackSource … // TestGdbInfCallstack tests that gdb can unwind the callstack of cgo programs // on arm64 platforms without endless frames of function 'crossfunc1'. // https://golang.org/issue/37238 func TestGdbInfCallstack(t *testing.T) { … }