[opt](stacktrace) Optimize stacktrace output #22467
This commit is contained in:
@ -45,11 +45,7 @@ std::string get_stack_trace() {
|
||||
} else if (tool == "glibc") {
|
||||
return get_stack_trace_by_glibc();
|
||||
} else if (tool == "libunwind") {
|
||||
#if USE_UNWIND
|
||||
return get_stack_trace_by_libunwind();
|
||||
#else
|
||||
return get_stack_trace_by_glog();
|
||||
#endif
|
||||
} else {
|
||||
return "no stack";
|
||||
}
|
||||
@ -82,7 +78,7 @@ std::string get_stack_trace_by_glibc() {
|
||||
}
|
||||
|
||||
std::string get_stack_trace_by_libunwind() {
|
||||
return StackTrace().toString();
|
||||
return "\n" + StackTrace().toString();
|
||||
}
|
||||
|
||||
} // namespace doris
|
||||
|
||||
Reference in New Issue
Block a user