Hi,
I have this array
static char keil[] = { "Keil is the bee's knees." }; // address eg 0x20000158
Knowing its adddress how to cast it into an array in 'Watch window' grammar so that I can see more then one item.
This
((char*)0x20000158)[4]
shows 4th item ie ' ' (space) which is expected in C notation. But I want to see an array with 4 elements, word "Keil".
Is there a tutorial for Watch window syntax ?
I use uVision V5.33
Variation to this question also here:
community.arm.com/.../how-to-watch-the-pointer-array-10-in-the-debug-watch-windows
Thanks
frank_ said:Is there a tutorial for Watch window syntax ?
Given it's effectively the same as regular C syntax, I don't think there has to be one. In the case at hand the expression to watch would be something along the lines of
*(char (*)[4])address
"Given it's effectively the same as regular C syntax" Is it ? Where can I read about it ? Or is it your assumption.
Unfortunatelly uVision does not like your suggestion:
Thanks anyway.
Some of those things like above work well in hover/tooltip mode. That is selecting part of an expression will be evaluated as such for the tooltip.
Regarding the watch window. Doesn't the label by itself give you what you want? I have a thing like Buffer[4] and removing all but Buffer gives me the whole array. Not sure how that works on your pointer though.
"Doesn't the label by itself give you what you want?"
There is no lable in my case, only an address. My keil[] is just a proxy to better show what I am after.