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

     1  package main
     2  
     3  // #cgo CFLAGS: -g -Wall -O0
     4  /*
     5  void sigsegv(int x) {
     6  	int *p = NULL;
     7  	*p = x;
     8  }
     9  void testfn(int x) {
    10  	sigsegv(x);
    11  }
    12  */
    13  import "C"
    14  
    15  func main() {
    16  	C.testfn(C.int(10))
    17  }