Complete state of a process

Posted by sravan on Stack Overflow See other posts from Stack Overflow or by sravan
Published on 2010-03-25T15:23:00Z Indexed on 2010/03/27 23:33 UTC
Read the original article Hit count: 179

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about compilation

Related posts about linker