[all-commits] [llvm/llvm-project] 7ced9f: [lldb] Refactor command option enum values (NFC)

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Jul 14 21:37:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ced9fff95473c1794b51a3cfd099b4fea3d1a58
      https://github.com/llvm/llvm-project/commit/7ced9fff95473c1794b51a3cfd099b4fea3d1a58
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-07-14 (Thu, 14 Jul 2022)

  Changed paths:
    M lldb/include/lldb/Interpreter/CommandObject.h
    A lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h
    M lldb/include/lldb/Target/Target.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/include/lldb/lldb-private-enumerations.h
    M lldb/source/Commands/CMakeLists.txt
    M lldb/source/Commands/CommandObjectBreakpoint.cpp
    M lldb/source/Commands/CommandObjectBreakpointCommand.cpp
    M lldb/source/Commands/CommandObjectCommands.cpp
    M lldb/source/Commands/CommandObjectDisassemble.cpp
    M lldb/source/Commands/CommandObjectExpression.cpp
    M lldb/source/Commands/CommandObjectFrame.cpp
    M lldb/source/Commands/CommandObjectHelp.cpp
    M lldb/source/Commands/CommandObjectLog.cpp
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Commands/CommandObjectMemoryTag.cpp
    M lldb/source/Commands/CommandObjectPlatform.cpp
    M lldb/source/Commands/CommandObjectProcess.cpp
    M lldb/source/Commands/CommandObjectRegister.cpp
    M lldb/source/Commands/CommandObjectReproducer.cpp
    M lldb/source/Commands/CommandObjectScript.cpp
    M lldb/source/Commands/CommandObjectSession.cpp
    M lldb/source/Commands/CommandObjectSettings.cpp
    M lldb/source/Commands/CommandObjectSource.cpp
    M lldb/source/Commands/CommandObjectStats.cpp
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Commands/CommandObjectThread.cpp
    M lldb/source/Commands/CommandObjectTrace.cpp
    M lldb/source/Commands/CommandObjectType.cpp
    M lldb/source/Commands/CommandObjectWatchpoint.cpp
    M lldb/source/Commands/CommandObjectWatchpointCommand.cpp
    A lldb/source/Commands/CommandOptionArgumentTable.cpp
    M lldb/source/Commands/CommandOptionsProcessLaunch.cpp
    M lldb/source/Commands/Options.td
    M lldb/source/Commands/OptionsBase.td
    M lldb/source/Interpreter/CommandObject.cpp
    M lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
    M lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
    M lldb/utils/TableGen/LLDBOptionDefEmitter.cpp

  Log Message:
  -----------
  [lldb] Refactor command option enum values (NFC)

Refactor the command option enum values and the command argument table
to connect the two. This has two benefits:

 - We guarantee that two options that use the same argument type have
   the same accepted values.
 - We can print the enum values and their description in the help
   output. (D129707)

Differential revision: https://reviews.llvm.org/D129703


  Commit: bcae3cdbd029210e9ecf42f07d38cc4ed4a95230
      https://github.com/llvm/llvm-project/commit/bcae3cdbd029210e9ecf42f07d38cc4ed4a95230
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-07-14 (Thu, 14 Jul 2022)

  Changed paths:
    M lldb/source/Interpreter/CommandObject.cpp
    M lldb/test/API/commands/help/TestHelp.py

  Log Message:
  -----------
  [lldb] Print the enum values and their description in the help output

Print the enum values and their description in the help output for
argument values. Until now, there was no way to get these values and
their description.

Example output:

(lldb) help <description-verbosity>
  <description-verbosity> -- How verbose the output of 'po' should be.

     compact : Only show the description string
     full    : Show the full output, including persistent variable's
               name and type

Differential revision: https://reviews.llvm.org/D129707


Compare: https://github.com/llvm/llvm-project/compare/888673b6e3bf...bcae3cdbd029


More information about the All-commits mailing list