stack frame structure of intel compiler

suman <suman.kumar@oracle.com>
23 Dec 2004 21:39:21 -0500

          From comp.compilers

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

From: suman <suman.kumar@oracle.com>
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

Hello,


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)


ebp
---------
return pc
args to next func
:
temporary storage / padding
:
local variables
:
ebp
---------
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 ?


Thanks,
Suman.
[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.