1 //===-- CrashReason.h -------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_CrashReason_H_
10 #define liblldb_CrashReason_H_
12 #include "lldb/lldb-types.h"
18 enum class CrashReason {
21 // SIGSEGV crash reasons.
26 // SIGILL crash reasons.
29 eIllegalAddressingMode,
36 // SIGBUS crash reasons,
41 // SIGFPE crash reasons,
48 eFloatInvalidOperation,
52 std::string GetCrashReasonString(CrashReason reason, lldb::addr_t fault_addr);
53 std::string GetCrashReasonString(CrashReason reason, const siginfo_t &info);
55 const char *CrashReasonAsString(CrashReason reason);
57 CrashReason GetCrashReason(const siginfo_t &info);
59 #endif // #ifndef liblldb_CrashReason_H_