Full process status

I wrote a small program that looks like this:

#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 gcc -save-temps helloworld.c command . The save-temps flag allows us to save intermediate files helloworld.i, helloworld.s, helloworld.o

Now I want to know exactly how the stack of this program changes at runtime. Can someone please tell me how to do this.

My goal in this question is to know for sure that everything happens during the execution of any program.

+3
source share
1 answer

helloworld.s, , , , , / . , -g, gdb.

+1

Source: https://habr.com/ru/post/1738507/


All Articles