Are there Visual C++ versions of the following (in GCC)?
__builtin_return_address__builtin_frame_address
Reference – http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html
If not, is there a way to emulate them?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a full list of the available Visual Studio 2008 Compiler Intrinsics. One of the ones you are specifically looking for here is _ReturnAddress… still looking for the other.
For walking the stack (and getting frame pointers), read the details on the Visual Leak Detector stack walking mechanism, which uses StackWalk64 internally.