14#ifndef LLVM_SUPPORT_SIGNALS_H
15#define LLVM_SUPPORT_SIGNALS_H
17#include "llvm/Config/llvm-config.h"
22#if LLVM_ENABLE_DEBUGLOC_TRACKING_ORIGIN
48 std::string *ErrMsg =
nullptr);
63 bool DisableCrashReporting =
false);
73#if LLVM_ENABLE_DEBUGLOC_TRACKING_ORIGIN
75#error DebugLoc origin-tracking should not be enabled in Release builds.
83template <
unsigned long MaxDepth>
84int getStackTrace(std::array<void *, MaxDepth> &StackTrace);
91void symbolizeAddresses(AddressSet &Addresses,
92 SymbolizedAddressMap &SymbolizedAddresses);
150LLVM_ABI void CallOneShotPipeSignalHandler();
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
This file defines the SmallVector class.
Implements a dense probed hash-table based set.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI void DefaultOneShotPipeSignalHandler()
On Unix systems and Windows, this function exits with an "IO error" exit code.
LLVM_ABI void PrintStackTrace(raw_ostream &OS, int Depth=0)
Print the stack trace using the given raw_ostream object.
LLVM_ABI void DisableSystemDialogsOnCrash()
Disable all system dialog boxes that appear when the process crashes.
LLVM_ABI void unregisterHandlers()
LLVM_ABI void DontRemoveFileOnSignal(StringRef Filename)
This function removes a file from the list of files to be removed on signal delivery.
LLVM_ABI bool RemoveFileOnSignal(StringRef Filename, std::string *ErrMsg=nullptr)
This function registers signal handlers to ensure that if a signal gets delivered that the named file...
LLVM_ABI void SetInfoSignalFunction(void(*Handler)())
Registers a function to be called when an "info" signal is delivered to the process.
LLVM_ABI void SetOneShotPipeSignalFunction(void(*Handler)())
Registers a function to be called in a "one-shot" manner when a pipe signal is delivered to the proce...
LLVM_ABI void SetInterruptFunction(void(*IF)())
This function registers a function to be called when the user "interrupts" the program (typically by ...
LLVM_ABI void RunSignalHandlers()
LLVM_ABI void AddSignalHandler(SignalHandlerCallback FnPtr, void *Cookie)
Add a function to be called when an abort/kill signal is delivered to the process.
LLVM_ABI void CleanupOnSignal(uintptr_t Context)
This function does the following:
LLVM_ABI void RunInterruptHandlers()
This function runs all the registered interrupt handlers, including the removal of files registered b...
LLVM_ABI void PrintStackTraceOnErrorSignal(StringRef Argv0, bool DisableCrashReporting=false)
When an error signal (such as SIGABRT or SIGSEGV) is delivered to the process, print a stack trace an...
void(*)(void *) SignalHandlerCallback
This is an optimization pass for GlobalISel generic memory operations.