coreminer 0.5.2

A debugger which can be used to debug programs that do not want to be debugged
Documentation
//! # Constants Module
//!
//! Defines signal constants and codes used in Linux ptrace debugging.
//!
//! These constants are primarily related to signal handling and are used to interpret
//! signals received from the debugged process. Many of these constants are not directly
//! available from the [`nix`] or Rust bindings of [`libc`](nix::libc), so they're defined here for convenience.
//!
//! Source reference: <https://elixir.bootlin.com/linux/v6.13.1/source/include/uapi/asm-generic/siginfo.h#L227>

#![allow(unused)]

/// Signal from the kernel
///
/// This constant indicates that a signal was generated by the kernel rather than
/// a user process or other source.
pub const SI_KERNEL: i32 = 0x80;

// ---------------- SIGTRAP si_codes ---------------------------------------------------------------

/// Process breakpoint
///
/// Generated when a process hits a breakpoint instruction (`int3`/`0xCC`).
/// Used by the debugger to detect when a breakpoint has been triggered.
pub const TRAP_BRKPT: i32 = 0x1;
/// Process trace trap
///
/// Generated during single-stepping operations through the process.
/// Indicates that a single instruction has been executed.
pub const TRAP_TRACE: i32 = 0x2;
/// Process taken branch trap
///
/// Generated when the processor takes a branch that was being monitored.
/// Used in branch trace debugging.
pub const TRAP_BRANCH: i32 = 0x3;
/// Hardware breakpoint/watchpoint
///
/// Generated when a hardware breakpoint or watchpoint is triggered.
/// Different from software breakpoints which use `TRAP_BRKPT`.
pub const TRAP_HWBKPT: i32 = 0x4;
/// Undiagnosed trap
///
/// Generated when the cause of a trap cannot be determined.
pub const TRAP_UNK: i32 = 0x5;
/// Perf event with sigtrap=1
///
/// Generated by the performance monitoring subsystem when
/// configured to generate `SIGTRAP` signals.
pub const TRAP_PERF: i32 = 0x6;