Query: __builtin_return_address
OS: netbsd
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
__BUILTIN_RETURN_ADDRESS(3) BSD Library Functions Manual __BUILTIN_RETURN_ADDRESS(3)NAME__builtin_return_address -- the return address of a functionSYNOPSISvoid * __builtin_return_address(unsigned int level); void * __builtin_frame_address(unsigned int level);DESCRIPTIONThe __builtin_return_address() is a GNU extension for obtaining the return address of the current function or one of the callers of the cur- rent function. The parameter level specifies the number of frames that should be scanned up in the call stack. A value 0 returns the address of the current function, a value 1 requests the address of the caller of the current function, a value 2 asks for the address of the caller's caller, and so forth. If the top of the call stack has been reached, the function will return 0. Note also that on some architectures it is only possible to determine the address of the current function. In such cases a value 0 is returned. Thus, it is usually safe to only use the value 0 for level. The __builtin_frame_address() behaves similarly, but returns the address of the function frame rather than the return address of the func- tion.SEE ALSOgcc(1), __builtin_object_size(3)CAVEATSThese are non-standard, compiler-specific extensions.BSDDecember 19, 2010 BSD
Related Man Pages |
---|
pmap_extract(9) - freebsd |
stack_inbounds(3c) - opensolaris |
pmap_extract(9) - debian |
disassembler(3) - osf1 |
thr_stksegment(3c) - sunos |
Similar Topics in the Unix Linux Community |
---|
dladdr for AIX 5.3 |
function trace back and address to line number conversion |