delve/_fixtures/deferstack.go
aarzilli 8f1fc63da8 proc,service,terminal: read defer list
Adds -defer flag to the stack command that decorates the stack traces
by associating each stack frame with its deferred calls.

Reworks proc.next to use this feature instead of using proc.DeferPC,
laying the groundwork to implement #1240.
2018-07-24 14:58:56 -07:00

33 lines
244 B
Go

package main
import "runtime"
func f1() {
}
func f2() {
}
func f3() {
}
func call1() {
defer f2()
defer f1()
call2()
}
func call2() {
defer f3()
defer f2()
call3()
}
func call3() {
runtime.Breakpoint()
}
func main() {
call1()
}