[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 17:25:10 PDT 2026


================
@@ -2774,6 +2782,13 @@ CommandObjectMultiwordThread::CommandObjectMultiwordThread(
                      "Defaults to current thread unless specified.",
                      nullptr, eStepTypeTrace)));
 
+  LoadSubCommand("step-back-inst",
----------------
jimingham wrote:

The thing to be careful about when adding built-in aliases is not to conflict with or add ambiguity to extant commands.  Since there's already an alias for `step` then `step` will still resolve to `thread step-in`.  So that one's fine.  And again since there's a `s` alias then `s` will still mean `thread step-in` as well.

In the fullness of time we'd also want quick access for the other back commands, which would be `nextbi`,  `nextb` etc.  

So this is a good pattern to start.

We try to reserve as much of the command namespace for user's aliases, so we take some care in adding them ourselves.  But step is an operation that people do often so having a short form (this one should just require `sb` so that's pretty ergonomic) makes this worthwhile.

It's also worth thinking about whether you are adding something that is a common term since that makes it more likely a user provided command will have chosen that term.  But step is already an alias, so that's unlikely that someone made a command called `stepb<something>` and even less `stepbi`.   

So those ones should be fine.

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


More information about the lldb-commits mailing list