Alternative to backtrace() on Linux that can find symbols for static functions
问题 In the man page, the backtrace() function on Linux says: Note that names of "static" functions are not exposed, and won't be available in the backtrace. However, with debugging symbols enabled ( -g ), programs like addr2line and gdb can still get the names of static functions. Is there a way to get the names of static functions programmatically from within the process itself? 回答1: If your executable (and linked libraries) are compiled with debugging information (i.e. with -g flag to gcc or g+