[EMAIL PROTECTED] writes:

> I am planning to use to __builtin_return_address to get the caller's
> address of a function.  My understanding is that this built-in function
> uses frame pointers (PUSH EBP to the stack) to track caller functions
> of multiple levels.

On x86, yes.

> If this is correct, does that also mean omit-frame-pointer compiler
> option has to always be OFF when __built_return_address(1) is used?

Yes: if '-fomit-frame-pointer' is in effect, then
__built_return_address(1) may return anything, or even crash.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to