[Lldb-commits] [lldb] Add a test for evicting unreachable modules from the global module cache (PR #74894)

via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 11 15:57:33 PST 2023


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 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873...684cee4a363c87c6b2cfa0776adb7c5923a0f6b6 lldb/test/API/python_api/global_module_cache/TestGlobalModuleCache.py
``````````

</details>

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

``````````diff
--- TestGlobalModuleCache.py	2023-12-11 23:54:38.000000 +0000
+++ TestGlobalModuleCache.py	2023-12-11 23:57:25.210256 +0000
@@ -39,11 +39,11 @@
         self.do_test_one_debugger(True)
 
     @expectedFailureAll
     def test_TwoTargetsOneDebugger(self):
         self.do_test_one_debugger(False)
-        
+
     def do_test_one_debugger(self, one_target):
         # Make sure that if we have one target, and we run, then
         # change the binary and rerun, the binary (and any .o files
         # if using dwarf in .o file debugging) get removed from the
         # shared module cache.  They are no longer reachable.
@@ -77,11 +77,13 @@
         self.copy_to_main(two_print_path, main_c_path)
 
         self.build(dictionary={"C_SOURCES": main_c_path, "EXE": "a.out"})
         error = lldb.SBError()
         if one_target:
-            (_, process, thread, _) = lldbutil.run_to_breakpoint_do_run(self, target, bkpt)
+            (_, process, thread, _) = lldbutil.run_to_breakpoint_do_run(
+                self, target, bkpt
+            )
         else:
             (target2, process2, thread, bkpt) = lldbutil.run_to_source_breakpoint(
                 self, "return counter;", main_filespec
             )
 
@@ -98,11 +100,11 @@
         # for the dSYM.
         if debug_style == "dsym":
             num_a_dot_out_entries += 1
 
         self.check_image_list_result(num_a_dot_out_entries, 1)
-        
+
     def check_image_list_result(self, num_a_dot_out, num_main_dot_o):
         # Now look at the global module list, there should only be one a.out, and if we are
         # doing dwarf in .o file, there should only be one .o file:
         image_cmd_result = lldb.SBCommandReturnObject()
         interp = self.dbg.GetCommandInterpreter()

``````````

</details>


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


More information about the lldb-commits mailing list