feat: export debugging signal handlers to zig

This commit is contained in:
CJ van den Berg 2025-07-03 15:58:41 +02:00
parent 2f7228cea6
commit b3176b32e6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 9 additions and 0 deletions

View file

@ -12,6 +12,10 @@ void install_remote_debugger();
void install_backtrace(); void install_backtrace();
void install_jitdebugger(); void install_jitdebugger();
void sighdl_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/);
void sighdl_remote_debugger(int no, siginfo_t * /*sigi*/, void * /*uco*/);
void sighdl_backtrace(int no, siginfo_t * /*sigi*/, void * /*uco*/);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -21,6 +21,11 @@ pub const install_debugger = c.install_debugger;
pub const install_remote_debugger = c.install_remote_debugger; pub const install_remote_debugger = c.install_remote_debugger;
pub const install_backtrace = c.install_backtrace; pub const install_backtrace = c.install_backtrace;
pub const install_jitdebugger = c.install_jitdebugger; pub const install_jitdebugger = c.install_jitdebugger;
pub const sighdl_debugger = c.sighdl_debugger;
pub const sighdl_remote_debugger = c.sighdl_remote_debugger;
pub const sighdl_backtrace = c.sighdl_backtrace;
pub const max_message_size = 8 * 4096; pub const max_message_size = 8 * 4096;
const message_buf_allocator = std.heap.c_allocator; const message_buf_allocator = std.heap.c_allocator;
threadlocal var message_buffer: std.ArrayList(u8) = std.ArrayList(u8).init(message_buf_allocator); threadlocal var message_buffer: std.ArrayList(u8) = std.ArrayList(u8).init(message_buf_allocator);