StupidBeauty
Read times:510Posted at:Sun Jan 24 18:27:57 2010使用glibc的backtrace、backtrace_symbols函数组合就能获得自己的调用栈了。 这两个函数在execinfo.h文件中定义。 最简单的例子是这样的:
void * BTArray[1000]; //Debug. size_t BTSize=0; //Debug. char ** BTStrings; //Debug. BTSize=backtrace(BTArray,1000); //Debug. BTStrings=backtrace_symbols(BTArray,BTSize); //Debug.
本座的理解:backtrace函数获取当前的调用栈中的帧的个数,backtrace_symbols获取调用栈的具体信息并且保存到一个字符串数组中。 原文可以看这里:http://blog.csdn.net/TopEmbedded/archive/2008/12/29/3635587.aspx
Your opinions
Posted at:Tue Jan 26 13:16:32 2010ys_sunshine妹妹,踩踩~~
Posted at:Tue Jan 26 13:21:07 2010太极美术工程师师长森叔,吉祥。妹妹,踩踩~~
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4