stack frame structure of intel compiler

suman <>
23 Dec 2004 21:39:21 -0500

          From comp.compilers

Related articles
stack frame structure of intel compiler (suman) (2004-12-23)
| List of all articles for this month |

From: suman <>
Newsgroups: comp.compilers
Date: 23 Dec 2004 21:39:21 -0500
Organization: Compilers Central
Keywords: 386, architecture, C
Posted-Date: 23 Dec 2004 21:39:21 EST


I am trying out a stack dumping program that dumps the content of the
complete call stack on a Intel Linux box. I noticed that generally the
stack frames are of the following format(noted with intel compiler)

return pc
args to next func
temporary storage / padding
local variables
return pc

The ebp and return pc can be easily traversed and highlighted. Local
variables though not dynamic determining the boundaries to mark them
out is one of my intentions. The temporary storage seems to be
completely under the control of the compiler.

Can you point me to some document by which I can know

- what is the size of the temporary storage in any arbitrary stack
frame (its boundaries)

- what is the boundary of the local variable part

- If I can print variable names and their sizes along side their
addresses my routine will be of great value.

Any other regions in the stack frame I am missing ?

[All of the x86 compilers I know use the stack frame format specified
a long time ago in the System V Interface Definition. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.