[Lldb-commits] [PATCH] D151843: Add EXC_SYSCALL to the allowable ignored exceptions for Darwin

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 1 10:21:05 PDT 2023


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG620dc1224ff9: Add EXC_SYSCALL to the set of ignorable mach exceptions. (authored by jingham).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151843/new/

https://reviews.llvm.org/D151843

Files:
  lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py


Index: lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
===================================================================
--- lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
+++ lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
@@ -30,10 +30,22 @@
             "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
Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -63,7 +63,8 @@
           || 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151843.527483.patch
Type: text/x-patch
Size: 2313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230601/4f2f261c/attachment-0001.bin>


More information about the lldb-commits mailing list