[lldb-dev] Not stopping on EXC_BAD_ACCESS
Richard Brooksby
rb at ravenbrook.com
Wed Jun 12 13:36:58 PDT 2013
Hello all.
I'm working on a memory manager (and garbage collector) that relies on handling hardware protection faults. That means that the programs using the GC will routinely get EXC_BAD_ACCESS faults and I want to handle them programmatically as SIGSEGV signals.
The problem is that LLDB always stops on EXC_BAD_ACCESS and there doesn't seem to be a way to continue on to the sending of a SIGSEGV and then into my exception handler. Since I expect to have thousands of protection faults, this pretty much makes my system unworkable in LLDB.
In GDB there is a setting "set dont-handle-bad-access 1" for this. I haven't been able to find an equivalent in LLDB. Also, the bug report I filed with Apple about it is still open.
Apple seem to be withdrawing GDB in Xcode 5, so I've got a problem. Up to now we just recommended using GDB.
I've taken a quick look over the LLDB source code, searched this lists archives, searched the LLVM Bugzilla, and asked around on #llvm, (and of course tried Google, Stackoverflow, and the Apple Dev Forums) but to no avail.
I'm willing to have a go at patching LLDB if someone would give me some pointers. This is a serious problem for us.
Any pointers?
References:
- "Developers can't debug MPS on OS X" <http://www.ravenbrook.com/project/mps/issue/job001669/>
- "Passing EXC_BAD_ACCESS in lldb" <https://devforums.apple.com/thread/188993>.
- "Debugging with the Memory Pool System" <https://www.ravenbrook.com/project/mps/master/manual/html/guide/debug.html>
- Apple Bug Report 12176156 and 7838916.
More information about the lldb-dev
mailing list