Glibc provides the very handy backtrace()
and backtrace_symbols()
functions, which can help getting the stack trace of the current function programmatically ( see here ).
Does the Windows API provide any similar functions?
Yes, take a look at the function CaptureStackBackTrace() . Use SymFromAddr() and its counterparts to get meaningful symbol names.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.