raddebugger
raddebugger copied to clipboard
Watch window expression doesn’t parse casting pointer to pointer to array
For example, with the following simple c program:
#include <stdio.h>
int main(){
const char* foo = "hello world";
puts(foo);
return 0;
}
In the watch window, if you write (char(*)[8])foo for example (casting foo to a pointer to an array of 8 chars), it complains with “Missing )”.
You also can’t dereference it (*(char(*)[8])foo) to get a watch expression of an array.
Ah yeah, we don't support the full C type info syntax at the moment. Visualizing pointers as pointing to arrays can be done in two ways, either by using the traditional Visual Studio style ,count syntax, or by using a View Rule of array:(count). So either put foo,8 in the Watch window, or put array:8 in the View Rule column. (The former is a fast path for the latter).