aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2023-05-31 14:43:00 -0700
committerJim Ingham <jingham@apple.com>2023-06-01 10:20:47 -0700
commit620dc1224ff9e4cb86e6e4d8e7c3941fc921887d (patch)
tree8df904bde31f0d68a6a65cbc424d3ad873934906
parent82b5a934b8e535d531b204af13775a820010c9be (diff)
downloadllvm-620dc1224ff9e4cb86e6e4d8e7c3941fc921887d.zip
llvm-620dc1224ff9e4cb86e6e4d8e7c3941fc921887d.tar.gz
llvm-620dc1224ff9e4cb86e6e4d8e7c3941fc921887d.tar.bz2
Add EXC_SYSCALL to the set of ignorable mach exceptions.
Add some more tests of what exceptions we accept and don't accept. Differential Revision: https://reviews.llvm.org/D151843
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp3
-rw-r--r--lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py18
2 files changed, 17 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 60327fb..f3f0fd7 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -63,7 +63,8 @@ static Status ExceptionMaskValidator(const char *string, void *unused) {
|| candidate == "EXC_BAD_INSTRUCTION"
|| candidate == "EXC_ARITHMETIC"
|| candidate == "EXC_RESOURCE"
- || candidate == "EXC_GUARD")) {
+ || candidate == "EXC_GUARD"
+ || candidate == "EXC_SYSCALL")) {
error.SetErrorStringWithFormat("invalid exception type: '%s'",
candidate.str().c_str());
return error;
diff --git a/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py b/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
index 677e631..429f1db 100644
--- a/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
+++ b/lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
@@ -30,10 +30,22 @@ class TestDarwinSignalHandlers(TestBase):
"EXC_BAD_AXESS",
error=True,
)
- # Now set ourselves to ignore some exceptions. The test depends on ignoring EXC_BAD_ACCESS, but I passed a couple
- # to make sure they parse:
+ # Make sure that we don't accept exceptions that lldb/debugserver need:
+ self.match(
+ "settings set platform.plugin.darwin.ignored-exceptions EXC_BREAKPOINT",
+ "EXC_BREAKPOINT",
+ error=True,
+ )
+ # Make sure that we don't accept exceptions that lldb/debugserver need:
+ self.match(
+ "settings set platform.plugin.darwin.ignored-exceptions EXC_SOFT_SIGNAL",
+ "EXC_SOFT_SIGNAL",
+ error=True,
+ )
+ # Now set ourselves to ignore some exceptions. The test depends on ignoring EXC_BAD_ACCESS, but I passed all the
+ # ones we currently accept to make sure they parse:
self.runCmd(
- "settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_ACCESS|EXC_ARITHMETIC"
+ "settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_ACCESS|EXC_BAD_INSTRUCTION|EXC_ARITHMETIC|EXC_RESOURCE|EXC_GUARD|EXC_SYSCALL"
)
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
self, "Stop here to get things going", self.main_source_file