Skip to content

Commit 960535d

Browse files
committed
Hint how to get a symbolized stack trace if llvm-symbolizer is not found on crashes
Most users of LLVM tools hit the raw traces and don't know how to get LLVM to symbolize automatically for them. When we print the non-symbolized stack trace, we will add information about how to get it symbolized. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D88269
1 parent 3185839 commit 960535d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Support/Unix/Signals.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,9 @@ void llvm::sys::PrintStackTrace(raw_ostream &OS, int Depth) {
576576
Depth = depth;
577577
if (printSymbolizedStackTrace(Argv0, StackTrace, Depth, OS))
578578
return;
579+
OS << "Stack dump without symbol names (ensure you have llvm-symbolizer in "
580+
"your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point "
581+
"to it):\n";
579582
#if HAVE_DLFCN_H && HAVE_DLADDR
580583
int width = 0;
581584
for (int i = 0; i < depth; ++i) {

0 commit comments

Comments
 (0)