github.com/undoio/delve@v1.9.0/_fixtures/cgostacktest/hello.c (about)

     1  #include <stdio.h>
     2  
     3  #include "_cgo_export.h"
     4  
     5  #ifdef __amd64__
     6  #define BREAKPOINT asm("int3;")
     7  #elif __i386__
     8  #define BREAKPOINT asm("int3;")
     9  #elif __aarch64__
    10  #define BREAKPOINT asm("brk 0;")
    11  #endif
    12  
    13  void helloworld_pt2(int x) {
    14  	BREAKPOINT;
    15  	helloWorld(x+1);
    16  }
    17  
    18  void helloworld(int x) {
    19  	helloworld_pt2(x+1);
    20  }
    21  
    22  void helloworld_pt4(int x) {
    23  	BREAKPOINT;
    24  	helloWorld2(x+1);
    25  }
    26  
    27  void helloworld_pt3(int x) {
    28  	helloworld_pt4(x+1);
    29  }