[Lldb-commits] [lldb] r139767 - /lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
Johnny Chen
johnny.chen at apple.com
Wed Sep 14 18:12:15 PDT 2011
Author: johnny
Date: Wed Sep 14 20:12:15 2011
New Revision: 139767
URL: http://llvm.org/viewvc/llvm-project?rev=139767&view=rev
Log:
Modify MachThread::NotifyException() to allow the arch specific protocol to process
the passed in (MachException::Data &)exc first before possible reassignment of the
member m_stop_exception with exc. This allows lldb to stop at the watchpoint of
a simple test program.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp?rev=139767&r1=139766&r2=139767&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp Wed Sep 14 20:12:15 2011
@@ -547,6 +547,10 @@
bool
MachThread::NotifyException(MachException::Data& exc)
{
+ // Allow the arch specific protocol to process (MachException::Data &)exc
+ // first before possible reassignment of m_stop_exception with exc.
+ bool handled = m_arch_ap->NotifyException(exc);
+
if (m_stop_exception.IsValid())
{
// We may have more than one exception for a thread, but we need to
@@ -560,32 +564,7 @@
{
m_stop_exception = exc;
}
- bool handled = m_arch_ap->NotifyException(exc);
- if (!handled)
- {
- handled = true;
-// switch (exc.exc_type)
-// {
-// case EXC_BAD_ACCESS:
-// break;
-// case EXC_BAD_INSTRUCTION:
-// break;
-// case EXC_ARITHMETIC:
-// break;
-// case EXC_EMULATION:
-// break;
-// case EXC_SOFTWARE:
-// break;
-// case EXC_BREAKPOINT:
-// break;
-// case EXC_SYSCALL:
-// break;
-// case EXC_MACH_SYSCALL:
-// break;
-// case EXC_RPC_ALERT:
-// break;
-// }
- }
+
return handled;
}
More information about the lldb-commits
mailing list