[Lldb-commits] [PATCH] D49106: Refactor parsing of argument lists with a raw string suffix.

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 9 16:31:52 PDT 2018


teemperor created this revision.
teemperor added a reviewer: jingham.
Herald added a subscriber: mgorny.

A subset of the LLDB commands follows this command line interface style:

  <command name> [arguments] -- <string suffix>

The parsing code for this interface has been so far been duplicated into the different
command objects which makes it hard to maintain and reuse elsewhere.

This patches improves the situation by adding a ArgsWithSuffix class that centralizes
the parsing logic and allows easier testing. The different commands now just call this class to
extract the arguments and the raw suffix from the provided user input.


https://reviews.llvm.org/D49106

Files:
  include/lldb/Interpreter/CommandObject.h
  include/lldb/Utility/Args.h
  source/Commands/CommandObjectCommands.cpp
  source/Commands/CommandObjectExpression.cpp
  source/Commands/CommandObjectPlatform.cpp
  source/Commands/CommandObjectType.cpp
  source/Commands/CommandObjectWatchpoint.cpp
  source/Interpreter/CommandObject.cpp
  source/Interpreter/Options.cpp
  source/Utility/Args.cpp
  unittests/Utility/ArgsWithSuffixTest.cpp
  unittests/Utility/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49106.154729.patch
Type: text/x-patch
Size: 31899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180709/b618b4ef/attachment-0001.bin>


More information about the lldb-commits mailing list