[Lldb-commits] [lldb] [lldb] Fix breakpoint resolver serialization bug (PR #76766)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 3 12:42:55 PST 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 b49e0ebedfefa2f3323081425016ca2ada902263...a9b6b6fee19fd19bf1fdce6fe8e9ed35f7c1567a lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
``````````

</details>

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

``````````diff
--- TestBreakpointSerialization.py	2024-01-03 20:40:03.000000 +0000
+++ TestBreakpointSerialization.py	2024-01-03 20:42:48.388892 +0000
@@ -55,24 +55,32 @@
         self.setup_targets_and_cleanup()
 
         sym_ctx_list = self.orig_target.FindFunctions("main")
         self.assertTrue(sym_ctx_list.GetSize() == 1, "Unable to find function `main'")
         sym_ctx = sym_ctx_list.GetContextAtIndex(0)
-        self.assertTrue(sym_ctx.IsValid(), "SBSymbolContext representing function `main' is invalid")
+        self.assertTrue(
+            sym_ctx.IsValid(), "SBSymbolContext representing function `main' is invalid"
+        )
         main_func = sym_ctx.GetFunction()
-        self.assertTrue(main_func.IsValid(), "SBFunction representing `main' is invalid")
+        self.assertTrue(
+            main_func.IsValid(), "SBFunction representing `main' is invalid"
+        )
         main_addr = main_func.GetStartAddress()
 
         bkpt = self.orig_target.BreakpointCreateBySBAddress(main_addr)
-        self.assertTrue(bkpt.IsValid(), "Could not place breakpoint on `main' by address")
+        self.assertTrue(
+            bkpt.IsValid(), "Could not place breakpoint on `main' by address"
+        )
         stream = lldb.SBStream()
         sd = bkpt.SerializeToStructuredData()
         sd.GetAsJSON(stream)
         serialized_data = json.loads(stream.GetData())
 
-        self.assertIn("a.out",
-                      serialized_data["Breakpoint"]["BKPTResolver"]["Options"]["ModuleName"])
+        self.assertIn(
+            "a.out",
+            serialized_data["Breakpoint"]["BKPTResolver"]["Options"]["ModuleName"],
+        )
 
     def test_structured_data_serialization(self):
         target = self.dbg.GetDummyTarget()
         self.assertTrue(target.IsValid(), VALID_TARGET)
 

``````````

</details>


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


More information about the lldb-commits mailing list