[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 20 02:32:54 PST 2025
================
@@ -0,0 +1,149 @@
+import lldb
+import time
+import unittest
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from lldbsuite.test.gdbclientutils import *
+from lldbsuite.test.lldbreverse import ReverseTestBase
+from lldbsuite.test import lldbutil
+
+
+class TestReverseContinueBreakpoints(ReverseTestBase):
+ def test_reverse_continue(self):
+ self.reverse_continue_internal(async_mode=False)
+
+ def test_reverse_continue_async(self):
+ self.reverse_continue_internal(async_mode=True)
+
+ def reverse_continue_internal(self, async_mode):
+ target, process, initial_threads = self.setup_recording(async_mode)
+
+ # Reverse-continue. We'll stop at the point where we started recording.
+ status = process.ContinueInDirection(lldb.eRunReverse)
+ self.assertSuccess(status)
+ self.expect_async_state_changes(
+ async_mode, process, [lldb.eStateRunning, lldb.eStateStopped]
+ )
+ self.expect(
+ "thread list",
+ STOPPED_DUE_TO_HISTORY_BOUNDARY,
+ substrs=["stopped", "stop reason = history boundary"],
+ )
----------------
labath wrote:
Is there something more to assert here? The PC value, current line number or something like that?
https://github.com/llvm/llvm-project/pull/112079
More information about the lldb-commits
mailing list