I'm trying to define a .natvis <DisplayString> for a uint32_t
type, to show as an array of four characters, which in the Watch window, during debugging, would be expressed a bit like this: (char*)&fourcc,4
.
Unfortunately, natvis doesn't seem to like the & very much - it gets ignored, e.g. {(char*)&fourcc,4}
, {(char*)&{fourcc},4
, {((char*)&)fourcc,4}
doesn't work. The documentation does not make it obvious how to perform casts, if it is supported at all.
What am I missing?