summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/MachException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachException.cpp')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachException.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachException.cpp b/lldb/tools/debugserver/source/MacOSX/MachException.cpp
index 24206a99adb..7492e9a66de 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachException.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachException.cpp
@@ -486,23 +486,26 @@ MachException::PortInfo::Save (task_t task)
// and back off to just what is supported on the current system
DNBError err;
- exception_mask_t exception_mask = EXC_MASK_ALL;
+ mask = EXC_MASK_ALL;
count = (sizeof (ports) / sizeof (ports[0]));
- err = ::task_get_exception_ports (task, exception_mask, masks, &count, ports, behaviors, flavors);
+ err = ::task_get_exception_ports (task, mask, masks, &count, ports, behaviors, flavors);
if (DNBLogCheckLogBit(LOG_EXCEPTIONS) || err.Fail())
- err.LogThreaded("::task_get_exception_ports ( task = 0x%4.4x, mask = 0x%x, maskCnt => %u, ports, behaviors, flavors )", task, exception_mask, count);
+ err.LogThreaded("::task_get_exception_ports ( task = 0x%4.4x, mask = 0x%x, maskCnt => %u, ports, behaviors, flavors )", task, mask, count);
- if (err.Error() == KERN_INVALID_ARGUMENT && exception_mask != PREV_EXC_MASK_ALL)
+ if (err.Error() == KERN_INVALID_ARGUMENT && mask != PREV_EXC_MASK_ALL)
{
- exception_mask = PREV_EXC_MASK_ALL;
+ mask = PREV_EXC_MASK_ALL;
count = (sizeof (ports) / sizeof (ports[0]));
- err = ::task_get_exception_ports (task, exception_mask, masks, &count, ports, behaviors, flavors);
+ err = ::task_get_exception_ports (task, mask, masks, &count, ports, behaviors, flavors);
if (DNBLogCheckLogBit(LOG_EXCEPTIONS) || err.Fail())
- err.LogThreaded("::task_get_exception_ports ( task = 0x%4.4x, mask = 0x%x, maskCnt => %u, ports, behaviors, flavors )", task, exception_mask, count);
+ err.LogThreaded("::task_get_exception_ports ( task = 0x%4.4x, mask = 0x%x, maskCnt => %u, ports, behaviors, flavors )", task, mask, count);
}
if (err.Fail())
+ {
+ mask = 0;
count = 0;
+ }
return err.Error();
}
OpenPOWER on IntegriCloud