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
This commit is contained in:
Enrico Granata
2016-04-25 00:52:47 +00:00
parent eb4d823184
commit 520a422bd8
14 changed files with 294 additions and 13 deletions

View File

@@ -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;
}