I don´t know, if this is related directly to VisualGDB, or Visual Studio, but I have problem displaying of wchar_t and std::wstring types in watch, when debugging C++ Linux project. I get “error reading variable” instead of text after “L”.
Strange is, that this problem happens only on NXP Yocto SDK built for our ARM i.MX7 board. When I target same project to default GCC on the Debian Linux build machine, variables are displayed correctly.
Only difference, that I was able to find is, that on Debian __WCHAR_TYPE__ is defined as int and on Yocto is defined as unsigned int.
I’m using latest VisualGDB 5.6R5 (built 4569) and Visual Studio 2019.
It looks like a bug coming from the toolchain or gdb executable. You can double-check the gdb replies to VisualGDB’s commands in the GDB Session window or in the GDB log. If the error message is present there, the issue is coming from GDB and is not controlled by VisualGDB.
If you wish, we can build a debug version of gdb, find the root cause of the issue, and patch it for you, however as it is not an issue of VisualGDB itself, it would be subject to our consulting rate.