How to display a pointer as an array, possibly of certain range

645 views Asked by At

Is there a way to display a pointer as an array (of a certain length, or better yet, a certain range) in Eclipse-CDT's Expressions view? Specifically, using ARM Development Studio (formerly DS-5).

Searching this question brings up a few old threads, but so far I could not find a method for doing that.

Note that some old mentions point to "show as an array" selection in the context menu of the Variables view. However this is not available in my version of DS, and I am looking for this option in the Expressions view.

Update: The equivalent MS Visual Studio option is to watch the expression (ptr + offset), length. This will show a sub array of 'length' items (of the same type as the ptr's base type), starting at the offset item.

1

There are 1 answers

2
raxetul On

In Expressions View in Eclipse CDT, add a pointer and select

Display As Array...

by right-clicking on pointer expression.

Display As Array

After clicking, Eclipse will ask you to enter the starting index and the length that you want to show.

Sub array starting index and its length

enter image description here