From 0ab44d10ea6a1858529b91bbf49d66077b319f0b Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 14 Jul 2015 09:51:52 -0500 Subject: [PATCH] Handle thread blocked on kevent --- proc/threads_darwin.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/proc/threads_darwin.go b/proc/threads_darwin.go index 40a1271a..ce57b980 100644 --- a/proc/threads_darwin.go +++ b/proc/threads_darwin.go @@ -54,10 +54,15 @@ func (t *Thread) blocked() bool { // TODO(dp) cache the func pc to remove this lookup pc, _ := t.PC() fn := t.dbp.goSymTable.PCToFunc(pc) - if fn != nil && (fn.Name == "runtime.mach_semaphore_wait" || fn.Name == "runtime.usleep") { + if fn == nil { + return false + } + switch fn.Name { + case "runtime.kevent", "runtime.mach_semaphore_wait", "runtime.usleep": return true + default: + return false } - return false } func writeMemory(thread *Thread, addr uintptr, data []byte) (int, error) { -- GitLab