Skip to content

Commit 2f5f1a0

Browse files
authored
Merge pull request #7794 from jimingham/allow-ignore-exc_syscall
Add EXC_SYSCALL to the set of ignorable mach exceptions.
2 parents 622a043 + 6ed5b92 commit 2f5f1a0

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static Status ExceptionMaskValidator(const char *string, void *unused) {
6262
|| candidate == "EXC_BAD_INSTRUCTION"
6363
|| candidate == "EXC_ARITHMETIC"
6464
|| candidate == "EXC_RESOURCE"
65-
|| candidate == "EXC_GUARD")) {
65+
|| candidate == "EXC_GUARD"
66+
|| candidate == "EXC_SYSCALL")) {
6667
error.SetErrorStringWithFormat("invalid exception type: '%s'",
6768
candidate.str().c_str());
6869
return error;

lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,22 @@ def suspended_thread_test(self):
3030
"EXC_BAD_AXESS",
3131
error=True,
3232
)
33-
# Now set ourselves to ignore some exceptions. The test depends on ignoring EXC_BAD_ACCESS, but I passed a couple
34-
# to make sure they parse:
33+
# Make sure that we don't accept exceptions that lldb/debugserver need:
34+
self.match(
35+
"settings set platform.plugin.darwin.ignored-exceptions EXC_BREAKPOINT",
36+
"EXC_BREAKPOINT",
37+
error=True,
38+
)
39+
# Make sure that we don't accept exceptions that lldb/debugserver need:
40+
self.match(
41+
"settings set platform.plugin.darwin.ignored-exceptions EXC_SOFT_SIGNAL",
42+
"EXC_SOFT_SIGNAL",
43+
error=True,
44+
)
45+
# Now set ourselves to ignore some exceptions. The test depends on ignoring EXC_BAD_ACCESS, but I passed all the
46+
# ones we currently accept to make sure they parse:
3547
self.runCmd(
36-
"settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_ACCESS|EXC_ARITHMETIC"
48+
"settings set platform.plugin.darwin.ignored-exceptions EXC_BAD_ACCESS|EXC_BAD_INSTRUCTION|EXC_ARITHMETIC|EXC_RESOURCE|EXC_GUARD|EXC_SYSCALL"
3749
)
3850
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
3951
self, "Stop here to get things going", self.main_source_file

0 commit comments

Comments
 (0)