Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

70 lines
3.1 KiB
C++

//===-- OpenBSDSignals.cpp ------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "OpenBSDSignals.h"
#ifdef __OpenBSD__
#include <csignal>
#define ADD_SIGCODE(signal_name, signal_value, code_name, code_value, ...) \
static_assert(signal_name == signal_value, \
"Value mismatch for signal number " #signal_name); \
static_assert(code_name == code_value, \
"Value mismatch for signal code " #code_name); \
AddSignalCode(signal_value, code_value, __VA_ARGS__)
#else
#define ADD_SIGCODE(signal_name, signal_value, code_name, code_value, ...) \
AddSignalCode(signal_value, code_value, __VA_ARGS__)
#endif /* ifdef __OpenBSD */
using namespace lldb_private;
OpenBSDSignals::OpenBSDSignals() : UnixSignals() { Reset(); }
void OpenBSDSignals::Reset() {
UnixSignals::Reset();
// clang-format off
// SIGILL
ADD_SIGCODE(SIGILL, 4, ILL_ILLOPC, 1, "illegal opcode");
ADD_SIGCODE(SIGILL, 4, ILL_ILLOPN, 2, "illegal operand");
ADD_SIGCODE(SIGILL, 4, ILL_ILLADR, 3, "illegal addressing mode");
ADD_SIGCODE(SIGILL, 4, ILL_ILLTRP, 4, "illegal trap");
ADD_SIGCODE(SIGILL, 4, ILL_PRVOPC, 5, "privileged opcode");
ADD_SIGCODE(SIGILL, 4, ILL_PRVREG, 6, "privileged register");
ADD_SIGCODE(SIGILL, 4, ILL_COPROC, 7, "coprocessor error");
ADD_SIGCODE(SIGILL, 4, ILL_BADSTK, 8, "internal stack error");
ADD_SIGCODE(SIGILL, 4, ILL_BTCFI, 9, "IBT missing on indirect call");
// SIGFPE
ADD_SIGCODE(SIGFPE, 8, FPE_INTDIV, 1, "integer divide by zero");
ADD_SIGCODE(SIGFPE, 8, FPE_INTOVF, 2, "integer overflow");
ADD_SIGCODE(SIGFPE, 8, FPE_FLTDIV, 3, "floating point divide by zero");
ADD_SIGCODE(SIGFPE, 8, FPE_FLTOVF, 4, "floating point overflow");
ADD_SIGCODE(SIGFPE, 8, FPE_FLTUND, 5, "floating point underflow");
ADD_SIGCODE(SIGFPE, 8, FPE_FLTRES, 6, "floating point inexact result");
ADD_SIGCODE(SIGFPE, 8, FPE_FLTINV, 7, "invalid floating point operation");
ADD_SIGCODE(SIGFPE, 8, FPE_FLTSUB, 8, "subscript out of range");
// SIGBUS
ADD_SIGCODE(SIGBUS, 10, BUS_ADRALN, 1, "invalid address alignment");
ADD_SIGCODE(SIGBUS, 10, BUS_ADRERR, 2, "non-existent physical address");
ADD_SIGCODE(SIGBUS, 10, BUS_OBJERR, 3, "object specific hardware error");
// SIGSEGV
ADD_SIGCODE(SIGSEGV, 11, SEGV_MAPERR, 1, "address not mapped to object",
SignalCodePrintOption::Address);
ADD_SIGCODE(SIGSEGV, 11, SEGV_ACCERR, 2, "invalid permissions for mapped object",
SignalCodePrintOption::Address);
// SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
// ===== ============== ======== ====== ====== ========================
AddSignal(32, "SIGTHR", false, false, false, "thread library AST");
// clang-format on
}