summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-04-25 00:52:47 +0000
committerEnrico Granata <egranata@apple.com>2016-04-25 00:52:47 +0000
commit520a422bd8e63087d84e01a01504fdca846ae529 (patch)
tree314d35b1a4d8fb1423f906acb74ae255225a6027 /lldb/source/DataFormatters/DumpValueObjectOptions.cpp
parenteb4d823184d3d3c7d588f03fbb72d13f026b6113 (diff)
downloadbcm5719-llvm-520a422bd8e63087d84e01a01504fdca846ae529.tar.gz
bcm5719-llvm-520a422bd8e63087d84e01a01504fdca846ae529.zip
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
Diffstat (limited to 'lldb/source/DataFormatters/DumpValueObjectOptions.cpp')
-rw-r--r--lldb/source/DataFormatters/DumpValueObjectOptions.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/DataFormatters/DumpValueObjectOptions.cpp b/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
index f3de1257bb8..e1f5320feee 100644
--- a/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
+++ b/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
@@ -242,4 +242,10 @@ DumpValueObjectOptions::SetRevealEmptyAggregates (bool reveal)
m_reveal_empty_aggregates = reveal;
return *this;
}
-
+
+DumpValueObjectOptions&
+DumpValueObjectOptions::SetElementCount (uint32_t element_count)
+{
+ m_element_count = element_count;
+ return *this;
+}
OpenPOWER on IntegriCloud