================
@@ -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
----------------
JDevlieghere wrote:

```suggestion
  const bool bad_access =
      (m_value == 1 || m_value == 12);           // EXC_BAD_ACCESS or EXC_GUARD
  const bool tag_fault = (m_exc_code == 0x106);        // EXC_ARM_MTE_TAG_FAULT
  // Whether the subcode (m_exc_subcode) holds the fault address. 
  const bool has_fault_addr = (m_exc_data_count >= 2); 
```

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