================
@@ -77,19 +77,27 @@ static void DescribeAddressBriefly(Stream &strm, const 
Address &addr,
   strm.Printf(".\n");
 }
 
+std::optional<addr_t> StopInfoMachException::GetTagFaultAddress() const {
+  bool bad_access =
+      (m_value == 1 || m_value == 12);           // EXC_BAD_ACCESS or EXC_GUARD
+  bool tag_fault = (m_exc_code == 0x106);        // EXC_ARM_MTE_TAG_FAULT
+  bool has_fault_addr = (m_exc_data_count >= 2); // m_exc_subcode -> fault addr
+
+  if (bad_access && tag_fault && has_fault_addr)
+    return m_exc_subcode; // Fault address
----------------
JDevlieghere wrote:

Comments should be english prose with capitalization and periods. 
```suggestion
  if (bad_access && tag_fault && has_fault_addr)
    return m_exc_subcode; // The subcode is the fault address.
```

https://github.com/llvm/llvm-project/pull/172579
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to