[Lldb-commits] [lldb] [WIP] memory find speedup+bugfix (PR #104193)

via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 15 07:04:05 PDT 2024


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 20b2c9f10fe09f2c5cbd3da7f0af8df24f62e899...a537a48c444e9dec3a85241d9726d6f3187a43cf lldb/test/API/functionalities/memory/find/TestMemoryFind.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- TestMemoryFind.py	2024-08-15 14:00:02.000000 +0000
+++ TestMemoryFind.py	2024-08-15 14:03:36.803186 +0000
@@ -79,13 +79,18 @@
             'memory find -s "nothere" `stringdata` `stringdata+10`',
             substrs=["data not found within the range."],
         )
 
         pagesize = self.frame().FindVariable("pagesize").GetValueAsUnsigned()
-        mem_with_holes = self.frame().FindVariable("mem_with_holes").GetValueAsUnsigned()
+        mem_with_holes = (
+            self.frame().FindVariable("mem_with_holes").GetValueAsUnsigned()
+        )
         matches_var = self.frame().FindVariable("matches")
         self.assertEqual(matches_var.GetNumChildren(), 4)
-        matches = [f'data found at location: {matches_var.GetChildAtIndex(i).GetValueAsUnsigned():#x}' for i in range(4)]
+        matches = [
+            f"data found at location: {matches_var.GetChildAtIndex(i).GetValueAsUnsigned():#x}"
+            for i in range(4)
+        ]
         self.expect(
             'memory find -c 5 -s "needle" `mem_with_holes` `mem_with_holes+5*pagesize`',
             substrs=matches + ["no more matches within the range"],
         )

``````````

</details>


https://github.com/llvm/llvm-project/pull/104193


More information about the lldb-commits mailing list