diff --git a/pkg/proc/gdbserial/gdbserver.go b/pkg/proc/gdbserial/gdbserver.go index 4a1cab30..d35da689 100644 --- a/pkg/proc/gdbserial/gdbserver.go +++ b/pkg/proc/gdbserial/gdbserver.go @@ -330,8 +330,11 @@ func (p *gdbProcess) Connect(conn net.Conn, path string, pid int, debugInfoDirs // Workaround for darwin arm64. Apple's debugserver seems to have a problem // with not selecting the correct thread in the 'g' command and the returned - // registers are empty / an E74 error is thrown. - if v[len("version:"):] == "1200" && p.bi.Arch.Name == "arm64" { + // registers are empty / an E74 error is thrown. This was reported to LLVM + // as https://bugs.llvm.org/show_bug.cgi?id=50169 + version, err := strconv.ParseInt(v[len("version:"):], 10, 32) + + if err == nil && version >= 1200 && version <= 1205 && p.bi.Arch.Name == "arm64" { p.gcmdok = false } }