opnsense-src/contrib/llvm-project/lldb/source/Plugins/Process/POSIX/CrashReason.h
Dimitry Andric 0b57cec536 Move all sources from the llvm project into contrib/llvm-project.
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.

Updating the vendor area to match this layout is next.
2019-12-20 19:53:05 +00:00

59 lines
1.4 KiB
C++

//===-- CrashReason.h -------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_CrashReason_H_
#define liblldb_CrashReason_H_
#include "lldb/lldb-types.h"
#include <signal.h>
#include <string>
enum class CrashReason {
eInvalidCrashReason,
// SIGSEGV crash reasons.
eInvalidAddress,
ePrivilegedAddress,
eBoundViolation,
// SIGILL crash reasons.
eIllegalOpcode,
eIllegalOperand,
eIllegalAddressingMode,
eIllegalTrap,
ePrivilegedOpcode,
ePrivilegedRegister,
eCoprocessorError,
eInternalStackError,
// SIGBUS crash reasons,
eIllegalAlignment,
eIllegalAddress,
eHardwareError,
// SIGFPE crash reasons,
eIntegerDivideByZero,
eIntegerOverflow,
eFloatDivideByZero,
eFloatOverflow,
eFloatUnderflow,
eFloatInexactResult,
eFloatInvalidOperation,
eFloatSubscriptRange
};
std::string GetCrashReasonString(CrashReason reason, lldb::addr_t fault_addr);
std::string GetCrashReasonString(CrashReason reason, const siginfo_t &info);
const char *CrashReasonAsString(CrashReason reason);
CrashReason GetCrashReason(const siginfo_t &info);
#endif // #ifndef liblldb_CrashReason_H_