llvm-project/lldb/tools
Vedant Kumar 0877dd14e4 [Driver] Force llvm to install its handlers before lldb's
Install llvm's signal handlers up front to prevent lldb's handlers from being
ignored. This is (hopefully) a stopgap workaround.

When lldb invokes an llvm API that installs signal handlers (e.g.
llvm::sys::RemoveFileOnSignal, possibly via a compiler embedded within lldb),
lldb's signal handlers are overriden if llvm is installing its handlers for the
first time.

To work around llvm's behavior, force it to install its handlers up front, and
*then* install lldb's handlers. In practice this is used to prevent lldb test
processes from exiting due to IO_ERR when SIGPIPE is received.

Note that when llvm installs its handlers, it 1) records the old handlers it
replaces and 2) re-installs the old handlers when its new handler is invoked.
That means that a signal not explicitly handled by lldb can fall back to being
handled by llvm's handler the first time it is received, and then by the
default handler the second time it is received.

Differential Revision: https://reviews.llvm.org/D69403
2019-10-25 11:19:10 -07:00
..
argdumper [JSON] Use LLVM's library for argdumper 2019-10-01 17:41:55 +00:00
compact-unwind Add arm64_32 support to lldb, an ILP32 codegen 2019-10-16 19:14:49 +00:00
darwin-debug [CMake] `install-distribution` for LLDB on Darwin 2019-07-10 11:09:29 +00:00
darwin-threads the thread id is easier to read in base16. 2018-03-06 23:33:02 +00:00
debugserver Add arm64_32 support to lldb, an ILP32 codegen 2019-10-16 19:14:49 +00:00
driver [Driver] Force llvm to install its handlers before lldb's 2019-10-25 11:19:10 -07:00
intel-features cli-wrapper-mpxtable.cpp: fix file header 2019-07-25 05:15:50 +00:00
lldb-instr [lldb] [cmake] Support linking against clang-cpp dylib 2019-10-04 12:03:03 +00:00
lldb-mi [LLDB] Remove lldb-mi 2019-07-18 17:06:06 +00:00
lldb-perf/darwin/sketch Remove lldb-perf 2019-07-08 21:38:34 +00:00
lldb-server [LLDB] [lldb-server] Use llvm::InitLLVM for doing unicode conversion of arguments for windows 2019-10-11 11:47:07 +00:00
lldb-test Modernize the rest of the Find.* API (NFC) 2019-10-17 19:56:40 +00:00
lldb-vscode [lldb-vscode] correctly handle multiple sourceMap entries 2019-09-26 21:18:37 +00:00
CMakeLists.txt [CMake] Copy over the system debugserver when using LLDB_USE_SYSTEM_DEBUGSERVER 2019-09-24 22:39:04 +00:00