macOS: minor JIT debugging niceties

This commit is contained in:
Eric Warmenhoven 2024-10-28 23:02:47 -04:00
parent a21643b7fa
commit 52bfb2a7c3
1 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,10 @@
#include <stdlib.h>
#include <string.h>
#include <mach/task.h>
#include <mach/mach_init.h>
#include <mach/mach_port.h>
#include <boolean.h>
#include <file/file_path.h>
#include <string/stdstring.h>
@ -1079,6 +1083,10 @@ static void open_document_handler(
int main(int argc, char *argv[])
{
#ifndef NDEBUG
task_set_exception_ports(mach_task_self(), EXC_MASK_BAD_ACCESS, MACH_PORT_NULL, EXCEPTION_DEFAULT, THREAD_STATE_NONE);
#endif
if (argc == 2)
{
if (argv[1])