The usual method, and the one employed before my change, of displaying strings in natvis is to make use of the "<variable>,s" format specifier; however, this method only works for null-terminated strings. My fix here is to use the "<pointer>,[size]" format specifier to display a bounded array, and then cast it to "const char*", which in the MSVC debugger has the desired effect of rendering the character array as a string.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
to:
Goes from:
to:
Similarly for the StringView dialog (when you click on the magnifying glass).
Comment Actions
Added "na" format specifier to not show the pointer address to the string, just like the original visualizer did. Updated screenshot of what it looks like forthcoming...