1e19387e6SJim Ingham #include <stdio.h> 2e19387e6SJim Ingham 3e19387e6SJim Ingham // This example is meant to recurse infinitely. 4e19387e6SJim Ingham // The extra struct is just to make the frame dump 5e19387e6SJim Ingham // more complicated. 6e19387e6SJim Ingham 7e19387e6SJim Ingham struct Foo { 8e19387e6SJim Ingham int a; 9e19387e6SJim Ingham int b; 10e19387e6SJim Ingham char *c; 11e19387e6SJim Ingham }; 12e19387e6SJim Ingham 13e19387e6SJim Ingham int forgot_termination(int input,struct Foo my_foo)14e19387e6SJim Inghamforgot_termination(int input, struct Foo my_foo) { 15*bbd54e08SPavel Labath char frame_increasing_buffer[0x1000]; // To blow the stack sooner. 16e19387e6SJim Ingham return forgot_termination(++input, my_foo); 17e19387e6SJim Ingham } 18e19387e6SJim Ingham 19e19387e6SJim Ingham int main()20e19387e6SJim Inghammain() 21e19387e6SJim Ingham { 22e19387e6SJim Ingham struct Foo myFoo = {100, 300, "A string you will print a lot"}; // Set a breakpoint here 23e19387e6SJim Ingham return forgot_termination(1, myFoo); 24e19387e6SJim Ingham } 25