debugbreak

A library for programmatically breaking into debuggers

brewmacoslinux
Try with needOr install directly
Source

About

Break into the debugger programmatically

Commands

debugbreak

Examples

Include debugbreak header in C/C++ code to trigger debugger breakpoint$ #include <debugbreak.h> int main() { debug_break(); return 0; }
Compile C program with debugbreak library$ gcc -o myprogram myprogram.c -ldebugbreak
Use in gdb to stop execution at specific code location$ gdb ./myprogram