func captureStack(skip, maxDepth int) []*stackFrame {
	pcs := make([]uintptr, maxDepth)
	count := runtime.Callers(skip+1, pcs)

	frames := make([]*stackFrame, count)
	for i, pc := range pcs[0:count] {
		frames[i] = newStackFrame(pc)
	}

	return frames
}
func captureStack(skip, maxDepth int) []*stackFrame {
	pcs := make([]uintptr, maxDepth)
	count := runtime.Callers(skip+1, pcs)

	frames := make([]*stackFrame, count)
	for i, pc := range pcs[0:count] {
		frames[i] = newStackFrame(pc)
	}

	return frames
}
// captureStack returns a slice of stack frames representing the stack
// of the calling go routine.