Hi,
currently one way to obtain the result you want in LLDB is to exploit summaries
For example,
(lldb) frame variable
(int *) x = 0x00000001001008e0
Let’s say that x is a pointer to 10 integers. To show the values:
(lldb) type summary add -f ${var[0-9]} “int *”
(lldb) frame variable
(int *) x = 0x00000001001008e0 [0,1,2,3,4,5,6,7,8,9]
Of course, you want to delete the summary after showing the variable, because not all int* are actually 10-element arrays.
Unfortunately, at present, trying this fails:
(lldb) frame variable x[0-9]
error: bitfield range 0-9 is not valid for “(int *) x”
Some code infrastructure is in place to have the above work, but currently not all the pieces are linked to one another and some “glue code” is missing, so the debugger is unable to infer that the above probably meant “show x[0] thru x[9]”, instead of “try to read bits 0 thru 9 of x” (but x is a non-scalar, so that raises an error)
If you are interested in looking at the details, StackFrame::GetValueForVariableExpressionPath and ValueObject::GetValueForExpressionPath are the places to look for implementation details and ideas.
Hope the above helps you.
Sincerely,
Enrico Granata