[Xcode] Ignore EXC_BAD_ACCESS in debug mode. Bypass SIGBUS signal in lldb using Breakpoint Action

This commit is contained in:
Edward Li 2020-08-10 02:02:07 +08:00
parent 125c1ff37d
commit 5f76370121
2 changed files with 41 additions and 1 deletions

View File

@ -61,7 +61,7 @@ void UpdateInputState(u32 port) {
}
void os_CreateWindow() {
#if 0
#ifdef DEBUG
int ret = task_set_exception_ports(
mach_task_self(),
EXC_MASK_BAD_ACCESS,

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "01FC208D-8891-48D7-854E-FD6EA64EB5E8"
type = "3"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
uuid = "C27CA3DB-537A-4EC5-8119-7DC8A92A27C0"
shouldBeEnabled = "Yes"
nameForDebugger = "Bypass bm_GetCode&apos;s SIGBUS signal"
ignoreCount = "0"
continueAfterRunningActions = "Yes"
symbolName = "NSApplicationMain"
moduleName = "">
<Actions>
<BreakpointActionProxy
ActionExtensionID = "Xcode.BreakpointAction.DebuggerCommand">
<ActionContent
consoleCommand = "process handle -s false SIGBUS">
</ActionContent>
</BreakpointActionProxy>
</Actions>
<Locations>
<Location
uuid = "C27CA3DB-537A-4EC5-8119-7DC8A92A27C0 - a8f96680031534a4"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "NSApplicationMain"
moduleName = "AppKit"
usesParentBreakpointCondition = "Yes"
offsetFromSymbolStart = "0">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>