linux signal codes, user settings to enable breaking on them, feed into debug engine

This commit is contained in:
Ryan Fleury committed 2026-10-01 11:49:53 -07:00
1 parent 56073cfff0
commit cc9951b5ef
8 files changed
+437 -166

No files matched your search

+17 -47
View File
@@ -139,75 +139,45 @@ D_EntityKindTable:
////////////////////////////////
//~ rjf: Exception Codes
@table(name lower_name code default display_string)
D_ExceptionCodeKindTable:
{
{Win32CtrlC win32_ctrl_c 0x40010005 1 "(Win32) Control-C" }
{Win32CtrlBreak win32_ctrl_break 0x40010008 1 "(Win32) Control-Break" }
{Win32WinRTOriginateError win32_win_rt_originate_error 0x40080201 0 "(Win32) WinRT Originate Error" }
{Win32WinRTTransformError win32_win_rt_transform_error 0x40080202 0 "(Win32) WinRT Transform Error" }
{Win32RPCCallCancelled win32_rpc_call_cancelled 0x0000071a 0 "(Win32) RPC Call Cancelled" }
{Win32DatatypeMisalignment win32_datatype_misalignment 0x80000002 0 "(Win32) Data Type Misalignment" }
{Win32AccessViolation win32_access_violation 0xc0000005 1 "(Win32) Access Violation" }
{Win32InPageError win32_in_page_error 0xc0000006 0 "(Win32) In Page Error" }
{Win32InvalidHandle win32_invalid_handle 0xc0000008 1 "(Win32) Invalid Handle Specified" }
{Win32NotEnoughQuota win32_not_enough_quota 0xc0000017 0 "(Win32) Not Enough Quota" }
{Win32IllegalInstruction win32_illegal_instruction 0xc000001d 0 "(Win32) Illegal Instruction" }
{Win32CannotContinueException win32_cannot_continue_exception 0xc0000025 0 "(Win32) Cannot Continue From Exception" }
{Win32InvalidExceptionDisposition win32_invalid_exception_disposition 0xc0000026 0 "(Win32) Invalid Exception Disposition Returned By Handler" }
{Win32ArrayBoundsExceeded win32_array_bounds_exceeded 0xc000008c 0 "(Win32) Array Bounds Exceeded" }
{Win32FloatingPointDenormalOperand win32_floating_point_denormal_operand 0xc000008d 0 "(Win32) Floating-Point Denormal Operand" }
{Win32FloatingPointDivisionByZero win32_floating_point_division_by_zero 0xc000008e 0 "(Win32) Floating-Point Division By Zero" }
{Win32FloatingPointInexactResult win32_floating_point_inexact_result 0xc000008f 0 "(Win32) Floating-Point Inexact Result" }
{Win32FloatingPointInvalidOperation win32_floating_point_invalid_operation 0xc0000090 0 "(Win32) Floating-Point Invalid Operation" }
{Win32FloatingPointOverflow win32_floating_point_overflow 0xc0000091 0 "(Win32) Floating-Point Overflow" }
{Win32FloatingPointStackCheck win32_floating_point_stack_check 0xc0000092 0 "(Win32) Floating-Point Stack Check" }
{Win32FloatingPointUnderflow win32_floating_point_underflow 0xc0000093 0 "(Win32) Floating-Point Underflow" }
{Win32IntegerDivisionByZero win32_integer_division_by_zero 0xc0000094 0 "(Win32) Integer Division By Zero" }
{Win32IntegerOverflow win32_integer_overflow 0xc0000095 0 "(Win32) Integer Overflow" }
{Win32PrivilegedInstruction win32_privileged_instruction 0xc0000096 0 "(Win32) Privileged Instruction" }
{Win32StackOverflow win32_stack_overflow 0xc00000fd 0 "(Win32) Stack Overflow" }
{Win32UnableToLocateDLL win32_unable_to_locate_dll 0xc0000135 0 "(Win32) Unable To Locate DLL" }
{Win32OrdinalNotFound win32_ordinal_not_found 0xc0000138 0 "(Win32) Ordinal Not Found" }
{Win32EntryPointNotFound win32_entry_point_not_found 0xc0000139 0 "(Win32) Entry Point Not Found" }
{Win32DLLInitializationFailed win32_dll_initialization_failed 0xc0000142 0 "(Win32) DLL Initialization Failed" }
{Win32FloatingPointSSEMultipleFaults win32_floating_point_sse_multiple_faults 0xc00002b4 0 "(Win32) Floating Point SSE Multiple Faults" }
{Win32FloatingPointSSEMultipleTraps win32_floating_point_sse_multiple_traps 0xc00002b5 0 "(Win32) Floating Point SSE Multiple Traps" }
{Win32AssertionFailed win32_assertion_failed 0xc0000420 1 "(Win32) Assertion Failed" }
{Win32ModuleNotFound win32_module_not_found 0xc06d007e 0 "(Win32) Module Not Found" }
{Win32ProcedureNotFound win32_procedure_not_found 0xc06d007f 0 "(Win32) Procedure Not Found" }
{Win32SanitizerErrorDetected win32_sanitizer_error_detected 0xe073616e 1 "(Win32) Sanitizer Error Detected" }
{Win32SanitizerRawAccessViolation win32_sanitizer_raw_access_violation 0xe0736171 0 "(Win32) Sanitizer Raw Access Violation" }
{Win32DirectXDebugLayer win32_directx_debug_layer 0x0000087a 1 "(Win32) DirectX Debug Layer" }
}
@enum D_ExceptionCodeKind:
{
Null,
@expand(D_ExceptionCodeKindTable a) `$(a.name)`,
@expand(W32_ExceptionCodeKindTable a) `Win32$(a.name)`,
@expand(LNX_SignalCodeTable a) `Linux$(a.name)`,
COUNT,
}
@data(U32) d_exception_code_kind_code_table:
{
`0`;
@expand(D_ExceptionCodeKindTable a) `$(a.code)`;
@expand(W32_ExceptionCodeKindTable a) `$(a.code)`;
@expand(LNX_SignalCodeTable a) `$(a.code)`,
}
@data(OperatingSystem) d_exception_code_kind_os_table:
{
`OperatingSystem_Null`;
@expand(W32_ExceptionCodeKindTable a) `OperatingSystem_Windows`;
@expand(LNX_SignalCodeTable a) `OperatingSystem_Linux`,
}
@data(String8) d_exception_code_kind_display_string_table:
{
`{0}`;
@expand(D_ExceptionCodeKindTable a) `str8_lit_comp("$(a.display_string)")`;
@expand(W32_ExceptionCodeKindTable a) `str8_lit_comp("$(a.display_string)")`;
@expand(LNX_SignalCodeTable a) `str8_lit_comp("$(a.name) ($(a.desc))")`,
}
@data(String8) d_exception_code_kind_lowercase_code_string_table:
{
`{0}`;
@expand(D_ExceptionCodeKindTable a) `str8_lit_comp("$(a.lower_name)")`;
@expand(W32_ExceptionCodeKindTable a) `str8_lit_comp("win32_$(a.lower_name)")`;
@expand(LNX_SignalCodeTable a) `str8_lit_comp("linux_$(a.name_lower)")`,
}
@data(B8) d_exception_code_kind_default_enable_table:
{
`0`;
@expand(D_ExceptionCodeKindTable a) `$(a.default)`;
@expand(W32_ExceptionCodeKindTable a) `$(a.default)`;
@expand(LNX_SignalCodeTable a) `$(a.break_default)`;
}
+238 -41
View File
@@ -38,7 +38,7 @@ str8_lit_comp("Breakpoint"),
str8_lit_comp("AddressRangeAnnotation"),
};
U32 d_exception_code_kind_code_table[38] =
U32 d_exception_code_kind_code_table[69] =
{
0,
0x40010005,
@@ -78,51 +78,186 @@ U32 d_exception_code_kind_code_table[38] =
0xe073616e,
0xe0736171,
0x0000087a,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
};
String8 d_exception_code_kind_display_string_table[38] =
OperatingSystem d_exception_code_kind_os_table[69] =
{
OperatingSystem_Null,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Windows,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
OperatingSystem_Linux,
};
String8 d_exception_code_kind_display_string_table[69] =
{
{0},
str8_lit_comp("(Win32) Control-C"),
str8_lit_comp("(Win32) Control-Break"),
str8_lit_comp("(Win32) WinRT Originate Error"),
str8_lit_comp("(Win32) WinRT Transform Error"),
str8_lit_comp("(Win32) RPC Call Cancelled"),
str8_lit_comp("(Win32) Data Type Misalignment"),
str8_lit_comp("(Win32) Access Violation"),
str8_lit_comp("(Win32) In Page Error"),
str8_lit_comp("(Win32) Invalid Handle Specified"),
str8_lit_comp("(Win32) Not Enough Quota"),
str8_lit_comp("(Win32) Illegal Instruction"),
str8_lit_comp("(Win32) Cannot Continue From Exception"),
str8_lit_comp("(Win32) Invalid Exception Disposition Returned By Handler"),
str8_lit_comp("(Win32) Array Bounds Exceeded"),
str8_lit_comp("(Win32) Floating-Point Denormal Operand"),
str8_lit_comp("(Win32) Floating-Point Division By Zero"),
str8_lit_comp("(Win32) Floating-Point Inexact Result"),
str8_lit_comp("(Win32) Floating-Point Invalid Operation"),
str8_lit_comp("(Win32) Floating-Point Overflow"),
str8_lit_comp("(Win32) Floating-Point Stack Check"),
str8_lit_comp("(Win32) Floating-Point Underflow"),
str8_lit_comp("(Win32) Integer Division By Zero"),
str8_lit_comp("(Win32) Integer Overflow"),
str8_lit_comp("(Win32) Privileged Instruction"),
str8_lit_comp("(Win32) Stack Overflow"),
str8_lit_comp("(Win32) Unable To Locate DLL"),
str8_lit_comp("(Win32) Ordinal Not Found"),
str8_lit_comp("(Win32) Entry Point Not Found"),
str8_lit_comp("(Win32) DLL Initialization Failed"),
str8_lit_comp("(Win32) Floating Point SSE Multiple Faults"),
str8_lit_comp("(Win32) Floating Point SSE Multiple Traps"),
str8_lit_comp("(Win32) Assertion Failed"),
str8_lit_comp("(Win32) Module Not Found"),
str8_lit_comp("(Win32) Procedure Not Found"),
str8_lit_comp("(Win32) Sanitizer Error Detected"),
str8_lit_comp("(Win32) Sanitizer Raw Access Violation"),
str8_lit_comp("(Win32) DirectX Debug Layer"),
str8_lit_comp("Control-C"),
str8_lit_comp("Control-Break"),
str8_lit_comp("WinRT Originate Error"),
str8_lit_comp("WinRT Transform Error"),
str8_lit_comp("RPC Call Cancelled"),
str8_lit_comp("Data Type Misalignment"),
str8_lit_comp("Access Violation"),
str8_lit_comp("In Page Error"),
str8_lit_comp("Invalid Handle Specified"),
str8_lit_comp("Not Enough Quota"),
str8_lit_comp("Illegal Instruction"),
str8_lit_comp("Cannot Continue From Exception"),
str8_lit_comp("Invalid Exception Disposition Returned By Handler"),
str8_lit_comp("Array Bounds Exceeded"),
str8_lit_comp("Floating-Point Denormal Operand"),
str8_lit_comp("Floating-Point Division By Zero"),
str8_lit_comp("Floating-Point Inexact Result"),
str8_lit_comp("Floating-Point Invalid Operation"),
str8_lit_comp("Floating-Point Overflow"),
str8_lit_comp("Floating-Point Stack Check"),
str8_lit_comp("Floating-Point Underflow"),
str8_lit_comp("Integer Division By Zero"),
str8_lit_comp("Integer Overflow"),
str8_lit_comp("Privileged Instruction"),
str8_lit_comp("Stack Overflow"),
str8_lit_comp("Unable To Locate DLL"),
str8_lit_comp("Ordinal Not Found"),
str8_lit_comp("Entry Point Not Found"),
str8_lit_comp("DLL Initialization Failed"),
str8_lit_comp("Floating Point SSE Multiple Faults"),
str8_lit_comp("Floating Point SSE Multiple Traps"),
str8_lit_comp("Assertion Failed"),
str8_lit_comp("Module Not Found"),
str8_lit_comp("Procedure Not Found"),
str8_lit_comp("Sanitizer Error Detected"),
str8_lit_comp("Sanitizer Raw Access Violation"),
str8_lit_comp("DirectX Debug Layer"),
str8_lit_comp("SIGHUP (Hangup detected on controlling terminal or death of controlling process)"),
str8_lit_comp("SIGINT (Interrupt from keyboard)"),
str8_lit_comp("SIGQUIT (Quit from keyboard)"),
str8_lit_comp("SIGILL (Illegal Instruction)"),
str8_lit_comp("SIGTRAP (Trace/breakpoint trap)"),
str8_lit_comp("SIGABRT (Abort signal)"),
str8_lit_comp("SIGBUS (Bus error (bad address))"),
str8_lit_comp("SIGFPE (Erroneous arithmetic operation)"),
str8_lit_comp("SIGKILL (Kill signal)"),
str8_lit_comp("SIGUSR1 (User-defined signal 1)"),
str8_lit_comp("SIGSEGV (Invalid memory reference)"),
str8_lit_comp("SIGUSR2 (User-defined signal 2)"),
str8_lit_comp("SIGPIPE (Broken pipe; write to pipe with no readers)"),
str8_lit_comp("SIGALRM (Timer signal)"),
str8_lit_comp("SIGTERM (Termination signal)"),
str8_lit_comp("SIGSTKFLT (Stack fault on coprocessor)"),
str8_lit_comp("SIGCHLD (Child stopped, terminated, or continued)"),
str8_lit_comp("SIGCONT (Continue if stopped)"),
str8_lit_comp("SIGSTOP (Stop process)"),
str8_lit_comp("SIGTSTP (Stop typed at terminal)"),
str8_lit_comp("SIGTTIN (Terminal input for background process)"),
str8_lit_comp("SIGTTOU (Terminal output for background process)"),
str8_lit_comp("SIGURG (Urgent condition on socket)"),
str8_lit_comp("SIGXCPU (CPU time limit exceeded)"),
str8_lit_comp("SIGXFSZ (File size limit exceeded)"),
str8_lit_comp("SIGVTALRM (Virtual alarm clock)"),
str8_lit_comp("SIGPROF (Profiling timer expired)"),
str8_lit_comp("SIGWINCH (Window resize signal)"),
str8_lit_comp("SIGIO (I/O now possible)"),
str8_lit_comp("SIGPWR (Power failure)"),
str8_lit_comp("SIGSYS (Bad system call)"),
};
String8 d_exception_code_kind_lowercase_code_string_table[38] =
String8 d_exception_code_kind_lowercase_code_string_table[69] =
{
{0},
str8_lit_comp("win32_ctrl_c"),
@@ -162,9 +297,40 @@ str8_lit_comp("win32_procedure_not_found"),
str8_lit_comp("win32_sanitizer_error_detected"),
str8_lit_comp("win32_sanitizer_raw_access_violation"),
str8_lit_comp("win32_directx_debug_layer"),
str8_lit_comp("linux_sighup"),
str8_lit_comp("linux_sigint"),
str8_lit_comp("linux_sigquit"),
str8_lit_comp("linux_sigill"),
str8_lit_comp("linux_sigtrap"),
str8_lit_comp("linux_sigabrt"),
str8_lit_comp("linux_sigbus"),
str8_lit_comp("linux_sigfpe"),
str8_lit_comp("linux_sigkill"),
str8_lit_comp("linux_sigusr1"),
str8_lit_comp("linux_sigsegv"),
str8_lit_comp("linux_sigusr2"),
str8_lit_comp("linux_sigpipe"),
str8_lit_comp("linux_sigalrm"),
str8_lit_comp("linux_sigterm"),
str8_lit_comp("linux_sigstkflt"),
str8_lit_comp("linux_sigchld"),
str8_lit_comp("linux_sigcont"),
str8_lit_comp("linux_sigstop"),
str8_lit_comp("linux_sigtstp"),
str8_lit_comp("linux_sigttin"),
str8_lit_comp("linux_sigttou"),
str8_lit_comp("linux_sigurg"),
str8_lit_comp("linux_sigxcpu"),
str8_lit_comp("linux_sigxfsz"),
str8_lit_comp("linux_sigvtalrm"),
str8_lit_comp("linux_sigprof"),
str8_lit_comp("linux_sigwinch"),
str8_lit_comp("linux_sigio"),
str8_lit_comp("linux_sigpwr"),
str8_lit_comp("linux_sigsys"),
};
B8 d_exception_code_kind_default_enable_table[38] =
B8 d_exception_code_kind_default_enable_table[69] =
{
0,
1,
@@ -204,6 +370,37 @@ B8 d_exception_code_kind_default_enable_table[38] =
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
1,
};
C_LINKAGE_END
+36 -4
View File
@@ -106,6 +106,37 @@ D_ExceptionCodeKind_Win32ProcedureNotFound,
D_ExceptionCodeKind_Win32SanitizerErrorDetected,
D_ExceptionCodeKind_Win32SanitizerRawAccessViolation,
D_ExceptionCodeKind_Win32DirectXDebugLayer,
D_ExceptionCodeKind_LinuxSIGHUP,
D_ExceptionCodeKind_LinuxSIGINT,
D_ExceptionCodeKind_LinuxSIGQUIT,
D_ExceptionCodeKind_LinuxSIGILL,
D_ExceptionCodeKind_LinuxSIGTRAP,
D_ExceptionCodeKind_LinuxSIGABRT,
D_ExceptionCodeKind_LinuxSIGBUS,
D_ExceptionCodeKind_LinuxSIGFPE,
D_ExceptionCodeKind_LinuxSIGKILL,
D_ExceptionCodeKind_LinuxSIGUSR1,
D_ExceptionCodeKind_LinuxSIGSEGV,
D_ExceptionCodeKind_LinuxSIGUSR2,
D_ExceptionCodeKind_LinuxSIGPIPE,
D_ExceptionCodeKind_LinuxSIGALRM,
D_ExceptionCodeKind_LinuxSIGTERM,
D_ExceptionCodeKind_LinuxSIGSTKFLT,
D_ExceptionCodeKind_LinuxSIGCHLD,
D_ExceptionCodeKind_LinuxSIGCONT,
D_ExceptionCodeKind_LinuxSIGSTOP,
D_ExceptionCodeKind_LinuxSIGTSTP,
D_ExceptionCodeKind_LinuxSIGTTIN,
D_ExceptionCodeKind_LinuxSIGTTOU,
D_ExceptionCodeKind_LinuxSIGURG,
D_ExceptionCodeKind_LinuxSIGXCPU,
D_ExceptionCodeKind_LinuxSIGXFSZ,
D_ExceptionCodeKind_LinuxSIGVTALRM,
D_ExceptionCodeKind_LinuxSIGPROF,
D_ExceptionCodeKind_LinuxSIGWINCH,
D_ExceptionCodeKind_LinuxSIGIO,
D_ExceptionCodeKind_LinuxSIGPWR,
D_ExceptionCodeKind_LinuxSIGSYS,
D_ExceptionCodeKind_COUNT,
} D_ExceptionCodeKind;
@@ -133,10 +164,11 @@ struct {B32 *value_ptr; String8 name;} DEV_toggle_table[] =
C_LINKAGE_BEGIN
extern String8 d_entity_kind_code_name_table[13];
extern String8 d_entity_kind_display_string_table[13];
extern U32 d_exception_code_kind_code_table[38];
extern String8 d_exception_code_kind_display_string_table[38];
extern String8 d_exception_code_kind_lowercase_code_string_table[38];
extern B8 d_exception_code_kind_default_enable_table[38];
extern U32 d_exception_code_kind_code_table[69];
extern OperatingSystem d_exception_code_kind_os_table[69];
extern String8 d_exception_code_kind_display_string_table[69];
extern String8 d_exception_code_kind_lowercase_code_string_table[69];
extern B8 d_exception_code_kind_default_enable_table[69];
C_LINKAGE_END