Complete state of a process
- by sravan
hi all,
I wrote a small program which is as follows:
#include<stdio.h>
int c=0;
int main()
{
int a=10,b=20;
printf("Hello World\n");
c = a+b;
printf("%d\n",c);
return 0;
}
I can create a.out file using the command gcc -save-temps helloworld.c. The save-temps flag allows us to save the intermediate files, helloworld.i, helloworld.s, helloworld.o
Now i want to know exactly how the stack of this program changes during the execution. Can some one please tell me how to go about it.
My aim of this question is to know exactly what all happens during the execution of any program.