diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-15 01:12:15 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-15 01:12:15 +0000 |
commit | 88c1b77f7427c0dda49afac2ceba8fb81afc058c (patch) | |
tree | 5c823230cd014215e99e2657ce7eb91495eb3427 /lldb/tools/debugserver/source/MacOSX/MachThread.cpp | |
parent | 4299fdb1a394299acf52682d723674052faecf08 (diff) | |
download | bcm5719-llvm-88c1b77f7427c0dda49afac2ceba8fb81afc058c.tar.gz bcm5719-llvm-88c1b77f7427c0dda49afac2ceba8fb81afc058c.zip |
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.
llvm-svn: 139767
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachThread.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachThread.cpp | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachThread.cpp b/lldb/tools/debugserver/source/MacOSX/MachThread.cpp index 0944fdc0efc..84dd7db4a4c 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThread.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThread.cpp @@ -547,6 +547,10 @@ MachThread::ThreadDidStop() 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 @@ MachThread::NotifyException(MachException::Data& exc) { 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; } |