<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to debug a pointer to an array?</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/34351/how-to-debug-a-pointer-to-an-array</link><description> 
Using the watch or memory debug windows, does anyone know of a way
to view a pointer as if it were an array? 

 
i.e. 

 
uint8_t myArray[4];
uint8_t* myPtr = myArray;
 

 
Normally, you&amp;#39;ll only be able to see myArray[0] when viewing myPtr
in the debugger</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to debug a pointer to an array?</title><link>https://community.arm.com/thread/69859?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 17:47:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b42310bd-9f63-4ed3-a614-b4ea4ea29a4e</guid><dc:creator>Jeff Skaanland</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hey Brian,&lt;/p&gt;

&lt;p&gt;
I like that feature, too. As an work-around to the lack of it, you
could create a debug function (under Debug-&amp;gt;Function Editor). Save
it to a file and just import the file in the command window, then
call some_name() any time you want to get an update on the values in
the array.&lt;/p&gt;

&lt;p&gt;
pseudo code:&lt;/p&gt;

&lt;p&gt;
FUNC void some_name(count, * to_first_element){&lt;/p&gt;

&lt;p&gt;
for(int i = 0; i &amp;lt; count; i++){ printf(&amp;quot;%#x,&amp;quot;,
*to_first_element); }&lt;br /&gt;
}&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>