diff --git a/src/runtime/cgo/gcc_darwin_arm.c b/src/runtime/cgo/gcc_darwin_arm.c index 7bb7f88a86b..aa7f43832a3 100644 --- a/src/runtime/cgo/gcc_darwin_arm.c +++ b/src/runtime/cgo/gcc_darwin_arm.c @@ -123,6 +123,11 @@ init_working_dir() if (chdir(dir) != 0) { fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", dir); } + + // No-op to set a breakpoint on, immediately after the real chdir. + // Gives the test harness in go_darwin_arm_exec (which uses lldb) a + // chance to move the working directory. + getwd(dir); } void