[Lldb-commits] [PATCH] D77444: [commands] Support autorepeat in SBCommands
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 3 20:02:29 PDT 2020
jingham added a comment.
It's great to add this capability. But if you pass a nullptr, then the exact previous command will be repeated. That's sometimes what you want, but often not. For instance:
(lldb) source list -f foo -l 10
You DON'T want those same source lines to be dumped again.
The full solution would be to add an optional method to the Python class version of the command that returns the "repeat" command string. Then if that is implemented use the string it produces.
There are only a couple of commands (source list being one) that actually have to make up whole new command lines for the repeat command. For most of them - like disassemble - the command with no arguments does "continue from where you left off". So then the you return just your command name for the repeat command. Maybe there's some way to add this convention in without having to go whole hog on exposing the repeat string behavior.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits