[all-commits] [llvm/llvm-project] 77d131: Add the ability for Script based commands to speci...

jimingham via All-commits all-commits at lists.llvm.org
Wed Jul 3 10:39:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77d131eddb6ca9060c844fae9cb78779fa70c8f0
      https://github.com/llvm/llvm-project/commit/77d131eddb6ca9060c844fae9cb78779fa70c8f0
  Author: jimingham <jingham at apple.com>
  Date:   2024-07-03 (Wed, 03 Jul 2024)

  Changed paths:
    M lldb/bindings/python/python-wrapper.swig
    M lldb/docs/use/python-reference.rst
    M lldb/examples/python/cmdtemplate.py
    M lldb/include/lldb/Interpreter/CommandObject.h
    M lldb/include/lldb/Interpreter/ScriptInterpreter.h
    M lldb/source/Commands/CommandObjectCommands.cpp
    M lldb/source/Commands/CommandObjectThread.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
    M lldb/test/API/commands/command/script/add/TestAddParsedCommand.py
    M lldb/test/API/commands/command/script/add/test_commands.py
    M lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp

  Log Message:
  -----------
  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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list