[Lldb-commits] [PATCH] D91835: [lldb] Add Python bindings to print stack traces on crashes.
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 7 12:44:53 PDT 2022
labath added inline comments.
================
Comment at: lldb/source/API/SBDebugger.cpp:215-216
+ llvm::EnablePrettyStackTrace();
+ // We don't have a meaningful argv[0] to use, so use "SBDebugger" as a
+ // substitute.
+ llvm::sys::PrintStackTraceOnErrorSignal("SBDebugger");
----------------
if you really wanted to, you could call something like `llvm::sys::fs::getMainExecutable(nullptr, nullptr)` -- it quite often finds the executable name even without the argv0 and MainAddr hints.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91835/new/
https://reviews.llvm.org/D91835
More information about the lldb-commits
mailing list