[Lldb-commits] [PATCH] D70216: [LLDB] Don't install the pretty backtrace handlers twice.

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 13 17:36:47 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfa6984a3de81: [LLDB] Don't install the pretty stack trace handler twice. (authored by JDevlieghere).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70216

Files:
  lldb/tools/driver/Driver.cpp


Index: lldb/tools/driver/Driver.cpp
===================================================================
--- lldb/tools/driver/Driver.cpp
+++ lldb/tools/driver/Driver.cpp
@@ -22,7 +22,6 @@
 #include "llvm/Support/Format.h"
 #include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/WithColor.h"
@@ -809,13 +808,10 @@
 
 int main(int argc, char const *argv[])
 {
+  // Setup LLVM signal handlers and make sure we call llvm_shutdown() on
+  // destruction.
   llvm::InitLLVM IL(argc, argv);
 
-  // Print stack trace on crash.
-  llvm::StringRef ToolName = llvm::sys::path::filename(argv[0]);
-  llvm::sys::PrintStackTraceOnErrorSignal(ToolName);
-  llvm::PrettyStackTraceProgram X(argc, argv);
-
   // Parse arguments.
   LLDBOptTable T;
   unsigned MAI;
@@ -824,7 +820,7 @@
   opt::InputArgList input_args = T.ParseArgs(arg_arr, MAI, MAC);
 
   if (input_args.hasArg(OPT_help)) {
-    printHelp(T, ToolName);
+    printHelp(T, llvm::sys::path::filename(argv[0]));
     return 0;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70216.229213.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191114/78c3d7be/attachment-0001.bin>


More information about the lldb-commits mailing list