4

A book I am reading refers to an include file that shows how a stack frame looks on one's UNIX system.

In particular: /usr/include/sys/frame.h

I am having trouble finding the modern equivalent. Anyone have an idea? I'm on Ubuntu 12.10.


By the way, it is a description of stack frames and activation records that I want--not necesssarily that relic of a file. That information was stored in that file, "back in the day", though.

d0rmLife
  • 153

1 Answers1

2

You might want to have a look at the ptrace.h and calling.h files, which have some C-structures defining the stack frame layout and calling conventions (they can be found in the same folders as frame.h). Furthermore, the elfcore.h header file included with the gperftools project may provide some useful insight into the call-stack frames.

Also if you're so inclined, you might want to look at the x86 Assembly and x86 Disassembly books on Wikibooks. They have quite a lot of useful information (both high and low level) regarding stack frames and calling convention details.


In terms of frame.h, calling sudo find / -name "frame.h" on my Xubuntu 12.04 install returns the following:

/usr/src/linux-headers-3.2.0-23/arch/x86/include/asm/frame.h
/usr/src/linux-headers-3.2.0-33/arch/x86/include/asm/frame.h
/usr/src/linux-headers-3.2.0-35/arch/x86/include/asm/frame.h
/usr/src/linux-headers-3.2.0-34/arch/x86/include/asm/frame.h

Not surprisingly, there is no change to the file between the kernel versions listed above, and it's unlikely you would see any changes for compatibility reasons (of course, this depends on what architecture your system is).

Breakthrough
  • 34,847