Add a --element-count option to the expression command
authorEnrico Granata <egranata@apple.com>
Mon, 25 Apr 2016 00:52:47 +0000 (00:52 +0000)
committerEnrico Granata <egranata@apple.com>
Mon, 25 Apr 2016 00:52:47 +0000 (00:52 +0000)
commit520a422bd8e63087d84e01a01504fdca846ae529
tree314d35b1a4d8fb1423f906acb74ae255225a6027
parenteb4d823184d3d3c7d588f03fbb72d13f026b6113
Add a --element-count option to the expression command
This option evaluates an expression and, if the result is of pointer type, treats it as if it was an array of that many elements and displays such elements

This has a couple subtle points but is mostly as straightforward as it sounds

Add a parray N <expr> alias for this new mode

Also, extend the --object-description mode to do the moral equivalent of the above but display each element in --object-description mode
Add a poarray N <expr> alias for this

llvm-svn: 267372
14 files changed:
lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/main.cpp [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/main.mm [new file with mode: 0644]
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/DataFormatters/DumpValueObjectOptions.cpp
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp