diff options
author | jimingham <jingham@apple.com> | 2024-07-03 10:39:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 10:39:34 -0700 |
commit | 77d131eddb6ca9060c844fae9cb78779fa70c8f0 (patch) | |
tree | f540d78500a8a832a701db3e25b8a53dc91d0fac /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 94471e6d238acab291b5b652fc18f17c4815cc7d (diff) | |
download | llvm-77d131eddb6ca9060c844fae9cb78779fa70c8f0.zip llvm-77d131eddb6ca9060c844fae9cb78779fa70c8f0.tar.gz llvm-77d131eddb6ca9060c844fae9cb78779fa70c8f0.tar.bz2 |
Add the ability for Script based commands to specify their "repeat command" (#94823)
Among other things, returning an empty string as the repeat command
disables auto-repeat, which can be useful for state-changing commands.
There's one remaining refinement to this setup, which is that for parsed
script commands, it should be possible to change an option value, or add
a new option value that wasn't originally specified, then ask lldb "make
this back into a command string". That would make doing fancy things
with repeat commands easier.
That capability isn't present in the lldb_private side either, however.
So that's for a next iteration.
I haven't added this to the docs on adding commands yet. I wanted to
make sure this was an acceptable approach before I spend the time to do
that.
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 5e64dd2..4398cf3 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -132,7 +132,7 @@ public: Options *GetOptions() override { return &m_options; } std::optional<std::string> GetRepeatCommand(Args ¤t_args, - uint32_t idx) override { + uint32_t index) override { llvm::StringRef count_opt("--count"); llvm::StringRef start_opt("--start"); |