Given the following function:
double f(int x, int y, int z) {
int xx = x + y + z;
int yy = y * z;
double zz = pow(xx, yy);
return zz; // we'll dump the frame at this point
}
// ... f is called in main()
Lets debug it in gdb:
> break f # breakpoint on calling f
> next 3 # fast forward to breakpoint
> raw-frame
0x7fffffffe718: e4 51 55 55 55 55 00 00 [return address]
0x7fffffffe710: 20 e7 ff ff ff 7f 00 00 [saved rbp]
0x7fffffffe708: 04 00 00 00 08 00 00 00 [yy:int] [xx:int]
0x7fffffffe700: 00 00 00 00 00 00 b0 40 [zz:double]
0x7fffffffe6f8: 01 00 00 00 03 00 00 00 [y:int] [x:int]
0x7fffffffe6f0: 00 00 00 00 04 00 00 00 [rsp] [z:int]