Enable gcroot and other gc related sos commands.
The "gcroot" command currently doesn't work with lldb 3.6 (our default package), but
works fine with lldb 3.7.0.
lldb 3.6 terminates with
(lldb) sos GCRoot
00007fffcc004ce8
*** Error in `lldb-3.6': munmap_chunk(): invalid pointer: 0x000000000184cde8 ***
PAL_STDCPP_COMPAT is the define that the VS team added to allow the xplat
headers to be used. This is neccessary for the whole SOS directory now
because gcroot and other gc commands need unorderd_map, unorderd_set, etc.
from the stdlib.
Had to change all wchar_t to WCHAR because the xplat stdlib default is UTF32.
Had to rename and provide macros that conflict with the stdlib:
wcslen -> _wcslen
wcsncmp -> _wcsncmp
wcsrchr -> _wcsrchr
wcscmp -> _wcscmp
wcschr -> _wcschr
wcscspn -> _wcscspn
wcscat -> _wcscat
__in -> ___in
__out -> ___out
max(a, b) -> _max(a, b)
min(a, b) -> _min(a, b)
Had to ifdef PAL_STDCPP_COMPAT a lot more of pal.h, palrt.h and some other header files.
Changed a bunch of L"" to W("").
Commit migrated from https://github.com/dotnet/coreclr/commit/
2f4462661a5134428738c0da4ef2061857b7528e