Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: swanton@moose.usmcs.maine.edu (George P. Swanton)
Subject: How to find *address* of return address on stack?
Date: 12 Aug 1993 07:57:30 -0500	[thread overview]
Message-ID: <9308121257.AA25930@moose.usmcs.maine.edu> (raw)

Can anyone suggest a reliable method to determine the offset of the
return address within a stack frame given a stack pointer?
(This is for the Decstation 3000/400 AXP w/OSF/1 and needn't be portable)

Basically we're trying to get a package working that does it's own threads
(csim). It doesn't use setjmp/longjmp, rather it copies hunks of the 
stack around and tweaks the return address so a thread 'returns' to a 
particular cleanup function instead of the procedure the created it.

We've found enogh info in the exception package to find stack frames
and *get* ra's but we need to be able to get the *address* of the ra
on the stack.

I've RTF'd the online version of the assembly language reference, 
the man pages dealing with most of the exc_ routines and the related
*.h files. We are in the process of acquiring the 600p tech reference
so please don't suggest that (though quotes from the same would be
marvelous).

Any suggestions greatly appreciated.
gps
swanton@moose.usmcs.maine.edu



             reply	other threads:[~1993-08-12 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-12 12:57 George P. Swanton [this message]
1993-08-12 13:43 ` How to find *address* of return address on stack? Ken Cowan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox