[all-commits] [llvm/llvm-project] c1b07d: Have CommandObjectParsed check for "commands that ...

jimingham via All-commits all-commits at lists.llvm.org
Mon Jun 27 15:15:12 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1b07d617705dfdb3aabbdda51c1a40d99f7cc1a
      https://github.com/llvm/llvm-project/commit/c1b07d617705dfdb3aabbdda51c1a40d99f7cc1a
  Author: Jim Ingham <jingham at apple.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/API/SBCommandInterpreter.cpp
    M lldb/source/Commands/CommandObjectCommands.cpp
    M lldb/source/Commands/CommandObjectFrame.cpp
    M lldb/source/Commands/CommandObjectGUI.cpp
    M lldb/source/Commands/CommandObjectPlatform.cpp
    M lldb/source/Commands/CommandObjectProcess.cpp
    M lldb/source/Commands/CommandObjectQuit.cpp
    M lldb/source/Commands/CommandObjectReproducer.cpp
    M lldb/source/Commands/CommandObjectSource.cpp
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Commands/CommandObjectThreadUtil.cpp
    M lldb/source/Commands/CommandObjectTrace.cpp
    M lldb/source/Commands/CommandObjectType.cpp
    M lldb/source/Commands/CommandObjectVersion.cpp
    M lldb/source/Interpreter/CommandObject.cpp
    M lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp
    M lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M lldb/test/API/commands/gui/invalid-args/TestInvalidArgsGui.py
    M lldb/test/API/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py
    M lldb/test/API/commands/target/basic/TestTargetCommand.py
    M lldb/test/API/commands/target/dump/TestTargetDumpTypeSystem.py
    M lldb/test/API/commands/version/TestVersion.py
    M lldb/test/API/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
    M lldb/test/API/functionalities/completion/TestCompletion.py

  Log Message:
  -----------
  Have CommandObjectParsed check for "commands that take no arguments".

This is currently being done in an ad hoc way, and so for some
commands it isn't being checked.  We have the info to make this check,
since commands are supposed to add their arguments to the m_arguments
field of the CommandObject.  This change uses that info to check whether
the command received arguments in error.

A handful of commands weren't defining their argument types, I also had
to fix them.  And a bunch of commands were checking for arguments by
hand, so I removed those checks in favor of the CommandObject one.  That
also meant I had to change some tests that were checking for the ad hoc
error outputs.

Differential Revision: https://reviews.llvm.org/D128453




More information about the All-commits mailing list