#include #include #include #include //https://en.wikipedia.org/wiki/Setjmp.h jmp_buf env; static void handlejump(); static void calljump(char * x, char * y); static void a(char * x, char * y); static void b(char * x, char * y); int main(int argc, char* argv[]) { debugger(); } void debugger() { char x[100]; char * y = malloc(100); calljump(x,y); handlejump(); } void handlejump() { printf("Handling jump\n"); } void calljump(char * x, char * y) { printf("calljump\n"); a(x,y); } void a(char * x, char * y) { printf("a()\n"); b(x,y); } void b(char * x, char * y) { printf("b()\n"); printf("x:%08x\n",(unsigned int) x); printf("y:%08x\n",(unsigned int) y); while(1) { printf("%08x: %02x\n",(unsigned int) x,*(unsigned char *)x); x++; } }