Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* How to find *address* of return address on stack?
@ 1993-08-12 12:57 George P. Swanton
  1993-08-12 13:43 ` Ken Cowan
  0 siblings, 1 reply; 2+ messages in thread
From: George P. Swanton @ 1993-08-12 12:57 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-08-12 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-08-12 12:57 How to find *address* of return address on stack? George P. Swanton
1993-08-12 13:43 ` Ken Cowan

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