Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
Oops--thought I could delete this. I have the same question posted on Super User. If I get an answer there I will link it, since it may be helpful. Sorry for double post! –  d0rmLife Mar 7 '13 at 5:04
    
You could tell us what system would that be, and what it does/refers to. On my Arch machine, 'locate frame.h' returns nothing of the sort. –  schaiba Mar 7 '13 at 8:17
    
What "stack frame" are you talking about? If I understand correctly, this will depend on the compiler and exact compilation flags, so there won't be any uniform stack frame description. And messing with that isn't sane... –  vonbrand Mar 7 '13 at 10:26
    
@vonbrand en.wikipedia.org/wiki/Stack_frame#Structure should give a good idea. The exact structure varies between implementations, though, and I want to know what it looks like on my implementation. –  d0rmLife Mar 7 '13 at 18:50
    
@schaiba what system what would be? And what it refers to? x86 Ubuntu 12.10, and it refers to the stack frame, as my question says. Sorry, I don't understand what you are asking...! –  d0rmLife Mar 7 '13 at 18:52
add comment

2 Answers 2

AFAIK that header file is more an old-school unix or BSD thing, you can find it in Solaris and {Free,Open,Net}BSD:

See also

share|improve this answer
    
It certainly is old school: the book is from the mid 90's. The dated nature of the book is well compensated for by technical excellence, though. In fact, there are not so infrequent references to PDP-11's, so you are in the right ballpark with your assumption that it is an old school UNIX file. That being said, there has to be some sort of description for what I am seeking--the description of a stack frame. And that is something I am having difficulty finding. –  d0rmLife Mar 7 '13 at 19:17
    
You might be curious to see my answer below--someone on Super User suggested two header files that are definitely on the right track. +1'ed you anyways. –  d0rmLife Mar 7 '13 at 20:21
    
Yes, ptrace.h looks good, similar the *BSD frame.h, unlike the actual frame.h/frame.i in the Linux kernel source (whose purpose in unclear to me at this time). –  mr.spuratic Mar 7 '13 at 22:03
add comment
up vote 0 down vote accepted

A good answer was provided on Super User.

Whether or not the files discussed are precise extensions of the legacy file my author refers to remains unknown. However, one will find most of the relevant knowledge in the ptrace.h file and the calling.h file located in the /.../asm/ directory. This presumes an x86 processor.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.