[PATCH] D85458: Adding functionality to Stack Tracing

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 09:12:42 PDT 2020


aganea accepted this revision.
aganea added a comment.
This revision is now accepted and ready to land.

Change LGTM, do you have commit access? You should perhaps request it if you're planning on further patches.

In D85458#2210411 <https://reviews.llvm.org/D85458#2210411>, @dibya001 wrote:

> In some cases we would like to show just the call stack of the llvm pass that crashed, and not the complete call stack of the application which could be very big.

How do you decide on the depth of the callstack? Depending on where the crash occurs, the pass entry (runOnFunction) could be at different depth? How do you handle that?

> And also "optionally" print other information for better diagnostics when the crash happens

Ah yes, that would be really nice. You mean adding more `llvm::PrettyStackTraceEntry` contexts?



================
Comment at: llvm/unittests/Support/CrashRecoveryTest.cpp:95
+TEST(CrashRecoveryTest, LimitedStackTrace) {
+  std::string res;
+  llvm::raw_string_ostream RawStream(res);
----------------
Minor: `res` and `str` below should start with an uppercase.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85458/new/

https://reviews.llvm.org/D85458



More information about the llvm-commits mailing list