diff options
author | Greg Clayton <gclayton@apple.com> | 2012-03-06 00:24:17 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-03-06 00:24:17 +0000 |
commit | e16e2d02eac0293651338872b98b8a927a9b3f68 (patch) | |
tree | acedc53b4f26e0babc0e300ebf37dad775254b63 /lldb/tools/debugserver/source/MacOSX/MachException.cpp | |
parent | 718cfbe05af42c55bb26f2feb03d84ddb9bf1cda (diff) | |
download | bcm5719-llvm-e16e2d02eac0293651338872b98b8a927a9b3f68.tar.gz bcm5719-llvm-e16e2d02eac0293651338872b98b8a927a9b3f68.zip |
<rdar://problem/10986692>
Safeguard against building on next OS and run on current OS.
llvm-svn: 152077
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachException.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachException.cpp | 17 |
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(); } |