[Lldb-commits] [PATCH] D68363: Segregate the Python class + key/value dictionary into a separate OptionGroup

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 2 17:34:40 PDT 2019


jingham created this revision.
jingham added reviewers: clayborg, teemperor.
Herald added subscribers: lldb-commits, JDevlieghere, abidh, mgorny.
Herald added a project: LLDB.

I want to reuse these options (break set's -P -k -v) in another command (thread step-scripted) in a future commit, so I broke them off into their own OptionGroup.  I made the short options settable because you can never tell whether there's going to be the same three open slots in every command.  For instance, "thread step-scripted" uses -C not -P, which will be more correct if/when we have another script interpreter.  But -C was already taken for "break set"...

I added some tests for the parsing of these options.  In the course of adding those tests I discovered that if an OptionGroup returns an error, and the option is not the last option in the line, the error is ignored.  I fixed that as well - that's the change to Options.cpp


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68363

Files:
  lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
  lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py
  lldb/source/Commands/CommandObjectBreakpoint.cpp
  lldb/source/Commands/Options.td
  lldb/source/Interpreter/CMakeLists.txt
  lldb/source/Interpreter/Options.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68363.222938.patch
Type: text/x-patch
Size: 9424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191003/54d52ee1/attachment.bin>


More information about the lldb-commits mailing list