[Lldb-commits] [lldb] [debugserver] Support for `qMemTags` packet (PR #160952)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 26 14:29:10 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD lldb/test/API/macosx/mte/TestDarwinMTE.py lldb/packages/Python/lldbsuite/test/cpu_feature.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- test/API/macosx/mte/TestDarwinMTE.py 2025-09-26 21:17:39.000000 +0000
+++ test/API/macosx/mte/TestDarwinMTE.py 2025-09-26 21:28:41.720884 +0000
@@ -24,11 +24,14 @@
process = target.LaunchSimple(None, None, None)
self.assertState(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
self.expect(
"thread info",
- substrs=["stop reason = EXC_ARM_MTE_TAG_FAULT", "MTE tag mismatch detected"],
+ substrs=[
+ "stop reason = EXC_ARM_MTE_TAG_FAULT",
+ "MTE tag mismatch detected",
+ ],
)
@skipUnlessFeature(cpu_feature.AArch64.MTE)
def test_memory_read_with_tags(self):
self.build()
@@ -42,11 +45,12 @@
# 0x7d2c00950: 57 6f 72 6c 64 00 00 00 00 00 00 00 00 00 00 00 World........... (tag: 0xb)
# 0x7d2c00960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ (tag: 0x9)
self.expect(
"memory read ptr-16 ptr+48 --show-tags",
substrs=[" Hello...........", " World..........."],
- patterns=[r"(.*\(tag: 0x[0-9a-f]\)\n){4}"])
+ patterns=[r"(.*\(tag: 0x[0-9a-f]\)\n){4}"],
+ )
def _parse_pointer_tag(self):
return re.search(r"Logical tag: (0x[0-9a-f])", self.res.GetOutput()).group(1)
def _parse_memory_tags(self, expected_tag_count):
@@ -69,11 +73,11 @@
# [0x100a65a60, 0x100a65a70): 0x5
# [0x100a65a70, 0x100a65a80): 0x2 (mismatch)
self.expect(
"memory tag read ptr-1 ptr+33",
substrs=["Logical tag: 0x", "Allocation tags:", "(mismatch)"],
- patterns=[r"(\[.*\): 0x[0-9a-f].*\n){4}"]
+ patterns=[r"(\[.*\): 0x[0-9a-f].*\n){4}"],
)
self.assertEqual(self.res.GetOutput().count("(mismatch)"), 2)
ptr_tag = self._parse_pointer_tag()
tags = self._parse_memory_tags(4)
self.assertEqual(tags[1], ptr_tag)
``````````
</details>
https://github.com/llvm/llvm-project/pull/160952
More information about the lldb-commits
mailing list