Function TVMFFIBacktrace#
Defined in File c_api.h
Function Documentation#
-
const TVMFFIByteArray *TVMFFIBacktrace(const char *filename, int lineno, const char *func, int cross_ffi_boundary)#
Get stack backtrace in a string.
The backtrace is in the order of recent call first from the top of the stack to the bottom of the stack. This order makes it helpful for appending the extra backtrace as we unwind the stack.
When printing out, we encourage reverse the order of lines to make it align with python style.
Note
filename/func can be nullptr, then this info is skipped, they are useful for cases when debug symbols are not available.
- Parameters:
filename – The current file name.
lineno – The current line number
func – The current function
cross_ffi_boundary – Whether the backtrace is crossing the ffi boundary or we should stop at the ffi boundary when detected
- Returns:
The backtrace string