有没有在C中调用堆栈转储的功能? [英] Is there a function to invoke a stack dump in C?
本文介绍了有没有在C中调用堆栈转储的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
backtrace()函数的文档位于 GNU LIBC手册。
Can someone please provide an implementation of a C function that gets invoked to dump the current stack? It's for a x86 linux system. It can be invoked in 2 ways: explicitly by another function, or after a crash (probably as a trap/int handler). The output can be either to the screen or to a file, as indicated by a parameter (handle). A clear explanation/comments of how the stack is unwound would obviously be very helpful. Thank you.
解决方案
The documentation for the backtrace() function is in the GNU LIBC MANUAL.
这篇关于有没有在C中调用堆栈转储的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文