You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
USE_UNWIND is effective in StackTrace::tryCapture().
For ARM, although get_stack_trace_by_libunwind is called, the standard backtrace function from execinfo.h is actually used instead of unw_backtrace, regardless of whether USE_UNWIND is ON or OFF.
Search before asking
Version
2.1.7
What's Wrong?
#22683
When compiling for the ARM version with use_unwind=off, but get_stack_trace still defaults to using libunwind for stack trace printing.
std::string get_stack_trace(int start_pointers_index, std::string dwarf_location_info_mode) {
#ifdef ENABLE_STACKTRACE
if (dwarf_location_info_mode.empty()) {
dwarf_location_info_mode = config::dwarf_location_info_mode;
}
auto tool = config::get_stack_trace_tool;
if (tool == "glog") {
return get_stack_trace_by_glog();
} else if (tool == "boost") {
return get_stack_trace_by_boost();
} else if (tool == "glibc") {
return get_stack_trace_by_glibc();
} else if (tool == "libunwind") {
#if defined(APPLE) // TODO
return get_stack_trace_by_glog();
#endif
return get_stack_trace_by_libunwind(start_pointers_index, dwarf_location_info_mode);
} else {
return "no stack";
}
#endif
return "no enable stack";
}
What You Expected?
add a condition #if USE_UNWIND
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: