[Lldb-commits] [lldb] [LLDB] Extract process arguments from core dump for Linux (PR #185338)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 10 03:45:16 PDT 2026


================
@@ -58,6 +58,20 @@ def test_x86_64(self):
         """Test that lldb can read the process information from an x86_64 linux core file."""
         self.do_test("linux-x86_64", self._x86_64_pid, self._x86_64_regions, "a.out")
 
+    @skipIfLLVMTargetMissing("X86")
+    def test_x86_64_core_generated(self):
+        """Test that lldb can read the argument used for the process from an x86_64 linux core file."""
+        result = lldb.SBCommandReturnObject()
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "target create linux-x86_64.out --core linux-x86_64.core", result
+        )
+        out = result.GetOutput()
+        self.assertIn(
+            "Core was generated by `/test/test/test/test/test/test",
----------------
DavidSpickett wrote:

This is missing the closing quote and full stop. Since the message is pretty short, it's fine to include it verbatim here.

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


More information about the lldb-commits mailing list