[Lldb-commits] [lldb] [lldb] Add step back single instruction for targets supporting reverse execution (PR #191183)

via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 10 09:49:58 PDT 2026


================
@@ -629,6 +629,13 @@ class Thread : public std::enable_shared_from_this<Thread>,
   ///     An error that describes anything that went wrong
   virtual Status StepOut(uint32_t frame_idx = 0);
 
+  /// Default implementation for stepping back one instruction.
+  ///
+  /// This function is designed to be used by commands where the
+  /// process is publicly stopped.
+  ///
+  virtual Status StepBack();
----------------
jimingham wrote:

At some point, this API will go away and StepIn, StepOut StepOver will take a direction parameter.  But right now, we can only support StepIn(false, eLazyBoolNo, eLazyBoolNo) in the backwards direction, so doing that would just be awkward at this point.
But still, I think you should include Instruction in the name, StepBack gives no indication of how far you are planning to go backwards.

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


More information about the lldb-commits mailing list