proc: Never return a stack trace of zero frames

proc.(*Thread).Scope fails if we can find a FDE but PCToLine returns
nothing
This commit is contained in:
aarzilli
2016-03-23 13:36:51 +01:00
committed by Derek Parker
parent 0f4b7ce8c7
commit 53af850bdc

View File

@ -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
}