Re: Runtime Stack Examination

[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Andy on November 14, 2001 at 05:17:51:

In Reply to: Runtime Stack Examination posted by Joshua Adell on November 12, 2001 at 16:14:50:

: This has nothing to do with the current project.

: Does anyone know how to examine the runtime stack from within your program, specifically to determine within a function what the calling function/object is? Specifically, is there a way to return the address of an object which calls a method of another object?

In debugging mode, you can open the call stack by hitting alt+7. In terms of accesing the call stack from within your program, I have no earthly idea. However, my first inclination would be no, since the call stack is generated at run time.

But hey, if you want to know the address of the calling object from within the function, why don't you pass the "this" pointer into the function by constant reference? Just a thought...I don't know any implications of this, having never tried it myself.

: Thanks,
: Josh

Follow Ups:

Post a Followup




Optional Link URL:
Link Title:
Optional Image URL:

[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]