From 53af850bdc8e2db73ea64d02255e4ae4d1b97343 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Wed, 23 Mar 2016 13:36:51 +0100 Subject: [PATCH] proc: Never return a stack trace of zero frames proc.(*Thread).Scope fails if we can find a FDE but PCToLine returns nothing --- proc/stack.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proc/stack.go b/proc/stack.go index aa4e6585..bd3e633f 100644 --- a/proc/stack.go +++ b/proc/stack.go @@ -127,6 +127,9 @@ func (it *stackIterator) Next() bool { } if it.frame.Current.Fn == nil { + if it.top { + it.err = fmt.Errorf("PC not associated to any function") + } return false }