github.com/cnboonhan/delve@v0.0.0-20230908061759-363f2388c2fb/_fixtures/deferstack.go (about)

     1  package main
     2  
     3  import "runtime"
     4  
     5  func f1() {
     6  }
     7  
     8  func f2(a int8, b int32) {
     9  }
    10  
    11  func f3() {
    12  }
    13  
    14  func call1() {
    15  	defer f2(1, -1)
    16  	defer f1()
    17  	call2()
    18  }
    19  
    20  func call2() {
    21  	defer f3()
    22  	defer f2(42, 61)
    23  	call3()
    24  }
    25  
    26  func call3() {
    27  	runtime.Breakpoint()
    28  }
    29  
    30  func main() {
    31  	call1()
    32  }